any_any_any
any_any_any

Reputation: 1

Troubles with deploying Meteor bcrypt to server with old node v 0.10.40

I have a troubles with deploying meteor ([email protected]) app to server using Node.js v 0.10.40. And I have that errors:

-----------------------------------STDERR-----------------------------------
 {"node":">=6"} (current: {"node":"0.10.40","npm":"1.4.28"})
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.10.40","npm":"1.4.28"})
npm ERR! Error: Method Not Allowed
npm ERR!     at errorResponse (/root/.nvm/v0.10.40/lib/node_modules/npm/lib/cache/add-named.js:260:10)
npm ERR!     at /root/.nvm/v0.10.40/lib/node_modules/npm/lib/cache/add-named.js:203:12
npm ERR!     at saved (/root/.nvm/v0.10.40/lib/node_modules/npm/node_modules/npm-registry-client/lib/get.js:167:7)
npm ERR!     at Object.oncomplete (fs.js:108:15)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Linux 4.2.0-25-generic
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! cwd /opt/th_editor/tmp/bundle/programs/server/npm/npm-bcrypt/node_modules/bcrypt
npm ERR! node -v v0.10.40
npm ERR! npm -v 1.4.28
npm ERR! code E405
npm ERR! not ok code 0
-----------------------------------STDOUT-----------------------------------
 > ./bcrypt: npm install due to binary npm modules
----------------------------------------------------------------------------

It's may be problems on deploying server... Because before deploying works fine! And in the moment it's crashed...

Any other solutions on StackOverflow didn't help...

I can't update node version and app. Is there any solutions?) Thanks.

Upvotes: 0

Views: 113

Answers (1)

Jankapunkt
Jankapunkt

Reputation: 8413

Each Meteor release is built against a very specific version of node in order to integrate with ease and stability.

When you build a Meteor app using meteor build it creates a bundle, where npm modules are configured to target these specific version when building native extensions on npm install on your production machine.

So in order to deploy a custom build with success you first need to check your development version of node inside Meteor via

local

meteor node -v
v8.15.1 # note: this is the version for 1.8.1

This version needs to be installed on your server, otherwise it will fail. Note, that you can install several versions of node on your server at the same time.

A fast and easy way to install a specific version is using n:

server

npm install --global n
n 8.15.1

which will install [email protected] ins this example.

Readings

https://guide.meteor.com/deployment.html#custom-deployment

https://www.npmjs.com/package/n

Upvotes: 1

Related Questions