I’m having a somewhat similar problem when deploying to heroku since tuesday. It’s been hell trying to debug where is the error.
Only thing I could find is: it seems like there’s a memory overflow somewhere, causing the build to crash. I still did not manage to reproduce the error locally, but it also happens if you deploy to meteor galaxy, dokku, flynn, or something similar.
Right now I’m using a temporal server which I deploy using meteor-up.
Quick update: after some hours of exploring the dependencies in my project, I found xmlbuilder was causing some weird issues with meteor’s build system. After removing all packages using it as a dependency (npm ls and search for xmlbuilder), everything seems to work.
I’m still looking for the real problem, but being able to make the app run is good enough for now.
I tried this whole thing over for like the 10th time already and now I’m getting this completely different npm error:
npm WARN package.json meteor-dev-bundle@0.0.0 No description
npm WARN package.json meteor-dev-bundle@0.0.0 No repository field.
npm WARN package.json meteor-dev-bundle@0.0.0 No README data
npm WARN package.json meteor-dev-bundle@0.0.0 No license field.
-
> fibers@1.0.13 install /var/www/ayy/bundle/programs/server/node_modules/f ibers
> node build.js || nodejs build.js
`linux-x64-v8-4.5` exists; testing
Binary is fine; exiting
> meteor-dev-bundle@0.0.0 install /var/www/ayy/bundle/programs/server
> node npm-rebuild.js
> bcrypt@0.8.7 install /var/www/ayy/bundle/programs/server/npm/node_module s/meteor/npm-bcrypt/node_modules/bcrypt
> node-gyp rebuild
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYT HON env variable.
gyp ERR! stack at failNoPython (/usr/lib/node_modules/npm/node_modules/node- gyp/lib/configure.js:449:14)
gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/node-gyp/lib/config ure.js:353:11
gyp ERR! stack at F (/usr/lib/node_modules/npm/node_modules/which/which.js:6 9:16)
gyp ERR! stack at E (/usr/lib/node_modules/npm/node_modules/which/which.js:8 1:29)
gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/which.js:90:1 6
gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/node_modules/ isexe/index.js:44:5
gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/node_modules/ isexe/access.js:8:5
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:82:15)
gyp ERR! System Linux 4.4.0-59-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node- gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /var/www/ayy/bundle/programs/server/npm/node_modules/meteor/n pm-bcrypt/node_modules/bcrypt
gyp ERR! node -v v4.7.2
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm ERR! Linux 4.4.0-59-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "rebuild" "--no-bin-links" "--upd ate-binary"
npm ERR! node v4.7.2
npm ERR! npm v2.15.11
npm ERR! code ELIFECYCLE
npm ERR! bcrypt@0.8.7 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt@0.8.7 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the bcrypt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs bcrypt
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls bcrypt
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /var/www/ayy/bundle/programs/server/npm/node_modules/meteor/n pm-bcrypt/npm-debug.log
npm ERR! Linux 4.4.0-59-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "--production"
npm ERR! node v4.7.2
npm ERR! npm v2.15.11
npm ERR! code ELIFECYCLE
npm ERR! meteor-dev-bundle@0.0.0 install: `node npm-rebuild.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the meteor-dev-bundle@0.0.0 install script 'node npm-rebuild. js'.
npm ERR! This is most likely a problem with the meteor-dev-bundle package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node npm-rebuild.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs meteor-dev-bundle
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls meteor-dev-bundle
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /var/www/ayy/bundle/programs/server/npm-debug.log
It’s like if I fix an old issue, 2 new ones pop up somewhere.
Via the Passenger logs, I found what the problem is:
TypeError: Cannot read property 'stripe' of undefined
App 9635 stderr: at meteorInstall.server.methods.js (server/methods.js:9:32)
Looks like the stripe NPM package isn’t properly installed on my server, which leads to a bigger problem with 0 installed npm packages present in my app. I just can’t install my app’s npm dependencies. No idea why.
Alright, installed npm and I think it is good now. However, my app won’t start with the screen in the OP.
I opened the Passenger error log and get this:
App 13045 stderr: assert.js:92
App 13045 stderr: throw new assert.AssertionError({
App 13045 stderr:
App 13045 stderr:
App 13045 stderr:
App 13045 stderr:
App 13045 stderr:
App 13045 stderr:
App 13045 stderr:
App 13045 stderr:
App 13045 stderr: ^
App 13045 stderr:
App 13045 stderr: AssertionError: "undefined" === "function"
App 13045 stderr: at wrapPathFunction (/var/www/myApp/bundle/programs/server/mini-files.js:77:10)
App 13045 stderr: at Object.<anonymous> (/var/www/myApp/bundle/programs/server/mini-files.js:108:24)
App 13045 stderr: at Module._compile (module.js:456:26)
App 13045 stderr: at Object.Module._extensions..js (module.js:474:10)
App 13045 stderr: at Module.load (module.js:356:32)
App 13045 stderr: at Function.Module._load (module.js:312:12)
App 13045 stderr: at Module.require (module.js:364:17)
App 13045 stderr: at Module.require (/usr/share/passenger/helper-scripts/node-loader.js:81:25)
App 13045 stderr: at require (module.js:380:17)
App 13045 stderr: at Object.<anonymous> (/var/www/myApp/bundle/programs/server/boot.js:9:13)
[ 2017-01-22 22:40:28.0389 13016/7fa701e3e700 age/Cor/App/Implementation.cpp:304 ]: Could not spawn process for application /var/www/myApp/bundle: An error occurred while starting the web applicat$
Error ID: 3d72c638
Error details saved to: /tmp/passenger-error-uVIjgs.html
Message from application: An error occurred while starting the web application. It exited before signalling successful startup back to Phusion Passenger. Please read <a href="https://github.com/phus$
<h2>Raw process output:</h2>
<pre>
assert.js:92
throw new assert.AssertionError({
^
AssertionError: "undefined" === "function"
at wrapPathFunction (/var/www/myApp/bundle/programs/server/mini-files.js:77:10)
at Object.<anonymous> (/var/www/myApp/bundle/programs/server/mini-files.js:108:24)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at Module.require (/usr/share/passenger/helper-scripts/node-loader.js:81:25)
at require (module.js:380:17)
at Object.<anonymous> (/var/www/myApp/bundle/programs/server/boot.js:9:13)
</pre>
[ 2017-01-22 22:40:28.0439 13016/7fa703cd7700 age/Cor/Con/CheckoutSession.cpp:285 ]: [Client 1-1] Cannot checkout session because a spawning error occurred. The identifier of the error is 3d72c638. Pl$
Apparently, this means that the node version I’m using isn’t the right one, which is wrong because it’s v4.4.2 on development machine and on host machine.
I get 4.4.7 on development and 4.7.2 on deployment server. (I always did node -v on development to see the version of Node)
I don’t get it. I change the node version via nvm install v4.4.7 and it changes node version. When I log out and back in, the node version reverts back to 4.7.2?
When I run npm install --production, I get this error:
sh: 1: node: not found
npm ERR! weird error 127
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
From my research, that means my app uses some legacy node. To help solve this problem, I run sudo apt-get install nodejs-legacy and the problem is solved. However, the node version reverts all the way to v0.10.25, which causes the errors above. It’s a negative feedback loop.
nvm sets it for your user whereas passenger uses a global default! you can
tell passenger what node to use via the nginx conf section on your app, or
set node default to the required one on nvm.