Wrong version of node used when deploying Meteor

735 views Asked by At

Node.js 0.10.22 was installed using NVM. After installing meteoric and running

meteoric deploy
forever logs 0

we get the error output from Meteor

data:    bundle/main.js:10138 - error: Forever detected script exited with code: 1
data:    bundle/main.js:10138 - error: Forever restarting script for 0 time
data:    bundle/main.js:10138 - Meteor requires Node v0.10.21 or later.
data:    bundle/main.js:10138 - error: Forever detected script exited with code: 1
data:    bundle/main.js:10138 - error: Forever restarting script for 1 time
data:    bundle/main.js:10138 - Meteor requires Node v0.10.21 or later.
data:    bundle/main.js:10138 - error: Forever detected script exited with code: 1

$ node -v
v0.10.22

$ which node
/root/.nvm/v0.10.22/bin/node

Question: Seems like theres a problem with forever and NVM? Why is forever/meteor/meteorite saying that Node's version is older than v0.10.21? Any ideas on solving this problem?

1

There are 1 answers

0
David Weldon On BEST ANSWER

From our discussion, it sounds like you have the wrong version of node installed. See the history.md file for which version of node you should be running. If you are using the latest version of meteor, it's 0.10.21 as of this writing.

I think the right strategy is to ensure that no other version of node gets installed. If you want to use meteoric I would try the following:

  1. Start with a clean server instance.
  2. Install the correct version of node for your meteor version.
  3. Comment out lines 61 and 64 from meteoric.sh (the ones which add node.js-legacy and install npm) Note you may want to remove the sudo from the other npm commands depending on how you installed node in step 2.
  4. Allow meteoric to do its setup magic.

If all of that works, you should probably file an issue with meteoric to change the way node is installed.