Saturday, May 02, 2015

Fastest idempotent way to install nodejs in linux or MAC OSX

Simply run the below one-liner from my plain old bash (POB) recipe as shown below:
export NODE_VERSION=18.19.0; curl -sL https://raw.githubusercontent.com/nestoru/pob-recipes/master/common/nodejs.sh | sudo bash -s $NODE_VERSION $USER
Note that you might need to run 'npm rebuild' in your project(s) if you run into errors like:
Error: The module '/app/node_modules/node-expat/build/Release/node_expat.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 64. This version of Node.js requires
NODE_MODULE_VERSION 83. Please try re-compiling or re-installing

No comments:

Followers