Created
December 20, 2017 11:47
-
-
Save DMeechan/2f6e962622c3387785bb2e44298a153c to your computer and use it in GitHub Desktop.
Updating Node.js on IBM Cloud Delivery Pipeline
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Credit: http://gh-blog.mybluemix.net/blogs/cokeSchlumpf/rethink-it/posts/bluemix/node-buildpipeline.md?cm_sp=dw-bluemix-_-nospace-_-answers | |
# Paste the script below into IBM Cloud Delivery Pipeline Build process (shell script) | |
# Set your Node and NVM version: | |
export NODE_VERSION=8.9.3 | |
export NVM_VERSION=0.33.8 | |
export NVM_DIR=/home/pipeline/nvm | |
METEOR_HOME=.meteor/local | |
PATH=$METEOR_HOME/usr/bin:$METEOR_HOME/usr/lib/meteor/bin:$PATH | |
update_node() { | |
npm config delete prefix \ | |
&& curl https://raw.githubusercontent.com/creationix/nvm/v${NVM_VERSION}/install.sh | sh \ | |
&& . $NVM_DIR/nvm.sh \ | |
&& nvm install $NODE_VERSION \ | |
&& nvm alias default $NODE_VERSION \ | |
&& nvm use default \ | |
&& node -v \ | |
&& npm -v | |
npm install | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I ran into the same problem of needing a newer version to compile. Here is the beginning of my npm build script that installs the version of node and npm I need.