I am having trouble running the "git push heroku master" command, after cloning https://github.com/parse-community/parse-server-example.git locally and making some customization.
Here is part of the trace:
$ git push heroku master
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 302 bytes | 302.00 KiB/s, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Node.js app detected
remote:
remote: -----> Creating runtime environment
remote:
remote: NPM_CONFIG_LOGLEVEL=error
remote: NPM_CONFIG_PRODUCTION=true
remote: NODE_VERBOSE=false
remote: NODE_ENV=production
remote: NODE_MODULES_CACHE=true
remote:
remote: -----> Installing binaries
remote: engines.node (package.json): >=4.3
remote: engines.npm (package.json): unspecified (use default)
remote:
remote: Resolving node version >=4.3...
remote: Downloading and installing node 9.2.0...
remote: Using default npm version: 5.5.1
remote:
remote: -----> Restoring cache
remote: Loading 2 from cacheDirectories (default):
remote: - node_modules (exists - skipping)
remote: - bower_components (not cached - skipping)
remote:
remote: -----> Building dependencies
remote: Prebuild detected (node_modules already exists)
remote: Rebuilding any native modules
remote:
remote: > kerberos@0.0.23 install /tmp/build_d0567......8t5bffc/node_modules/kerberos
remote: > (node-gyp rebuild) || (exit 0)
remote:
remote: module.js:544
remote: throw err;
remote: ^
remote:
remote: Error: Cannot find module 'nan'
remote: at Function.Module._resolveFilename (module.js:542:15)
remote: at Function.Module._load (module.js:472:25)
remote: at Module.require (module.js:585:17)
remote: at require (internal/module.js:11:18)
remote: at [eval]:1:1
remote: at ContextifyScript.Script.runInThisContext (vm.js:50:33)
remote: at Object.runInThisContext (vm.js:152:38)
remote: at Object.<anonymous> ([eval]-wrapper:6:22)
remote: at Module._compile (module.js:641:30)
remote: at evalScript (bootstrap_node.js:470:27)
remote: gyp: Call to 'node -e "require('nan')"' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
remote: gyp ERR! configure error
remote: gyp ERR! stack Error: `gyp` failed with exit code: 1
remote: gyp ERR! stack at ChildProcess.onCpExit (/tmp/build_d0567......8t5bffc/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:336:16)
remote: gyp ERR! stack at ChildProcess.emit (events.js:159:13)
remote: gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
remote: gyp ERR! System Linux 3.13.0-133-generic
remote: gyp ERR! command "/tmp/build_d0567......8t5bffc/.heroku/node/bin/node" "/tmp/build_d0567......8t5bffc/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
remote: gyp ERR! cwd /tmp/build_d0567......8t5bffc/node_modules/kerberos
remote: gyp ERR! node -v v9.2.0
remote: gyp ERR! node-gyp -v v3.6.2
remote: gyp ERR! not ok
And here is what I can see in the logs:
heroku[web.1]: Starting process with command `npm start`
app[web.1]:
app[web.1]: > parse-server-example@1.4.0 start /app
app[web.1]: > node index.js
app[web.1]:
app[web.1]: throw err;
app[web.1]: module.js:544
app[web.1]:
app[web.1]: Error: Cannot find module './Options'
app[web.1]: ^
app[web.1]: at Function.Module._resolveFilename (module.js:542:15)
app[web.1]: at Function.Module._load (module.js:472:25)
app[web.1]: at Module.require (module.js:585:17)
app[web.1]: at Object.<anonymous> (/app/node_modules/parse-server/lib/ParseServer.js:9:16)
app[web.1]: at require (internal/module.js:11:18)
app[web.1]: at Module._compile (module.js:641:30)
app[web.1]: at Object.Module._extensions..js (module.js:652:10)
app[web.1]: at Module.load (module.js:560:32)
app[web.1]: at tryModuleLoad (module.js:503:12)
app[web.1]: at Function.Module._load (module.js:495:3)
app[web.1]: npm ERR! code ELIFECYCLE
app[web.1]: npm ERR! errno 1
app[web.1]: npm ERR! parse-server-example@1.4.0 start: `node index.js`
app[web.1]: npm ERR! Exit status 1
app[web.1]: npm ERR! Failed at the parse-server-example@1.4.0 start script.
app[web.1]: npm ERR! A complete log of this run can be found in:
app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output
app[web.1]: npm ERR!
app[web.1]:
app[web.1]: npm ERR! /app/.npm/_logs/2017-11-24T04_25_51_797Z-debug.log
heroku[web.1]: State changed from starting to crashed
heroku[web.1]: Process exited with status 1
Let me say that I can't find the file 2017-11-24T04_25_51_797Z-debug.log metioned in the log wherever I look. (Is it supposed to be visible somewhere?)
If anyone knows how to handle this problem, please let me know. By searching I have found similar issues on the net, but nothing leading to a solution.