Initial Installation
1. Install nvmcurl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash2. Install node version 4
nvm install 4
Upgrade NVM and Node version
1. Upgrade nvm usingcurl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.0/install.sh | bash
creationix/nvm/v0.32.0/install.sh | bash % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 10007 100 10007 0 0 5040 0 0:00:01 0:00:01 --:--:-- 5038 => nvm is already installed in /Users/Seet/.nvm, trying to update using git => => Source string already in /Users/Seet/.bash_profile => Close and reopen your terminal to start using nvm or run the following to use it now: export NVM_DIR="/Users/Seet/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
2. Upgrade to stable node js 5 version
nvm install 5
######################################################################## 100.0%3. Uninstall node js 4
Computing checksum with shasum -a 256
Checksums matched!
Now using node v5.12.0 (npm v3.8.6)
4. Set nvm alias to avoid this error: "N/A: version "N/A" is not yet installed."nvm uninstall 4
nvm alias default v5.12.05. Useful command for debugging
> nvm alias
default -> v5.12.0> nvm debug
node -> stable (-> v5.12.0) (default)
stable -> 5.12 (-> v5.12.0) (default)
iojs -> N/A (default)
lts/* -> lts/argon (-> N/A)
lts/argon -> v4.6.0 (-> N/A)
nvm --version: v0.32.0
$SHELL: /bin/bash
$HOME: /Users/Nebitrams
$NVM_DIR: '$HOME/.nvm'
$PREFIX: ''
$NPM_CONFIG_PREFIX: ''
nvm current: v5.12.0
which node: $NVM_DIR/versions/node/v5.12.0/bin/node
which iojs:
which npm: $NVM_DIR/versions/node/v5.12.0/bin/npm
npm config get prefix: $NVM_DIR/versions/node/v5.12.0
npm root -g: $NVM_DIR/versions/node/v5.12.0/lib/node_modules
Upgrade NPM
1. Upgrade nvm usingnpm install -g npm@latest
Common Issue for Parse-server Upgrade
This is a common error during upgrade of parse-server. After upgrade, the npm start may ends with error like this: "Cannot find module 'double-ended-queue'".
If you run npm list, you will see some missing modules such as the followings:
npm ERR! missing: double-ended-queue@^2.1.0-0, required by redis@2.8.0You can try to delete the package-lock.json and node_modules folder, following by re-install.
npm ERR! missing: redis-commands@^1.2.0, required by redis@2.8.0
npm ERR! missing: redis-parser@^2.6.0, required by redis@2.8.0
rm -rf package-lock.json node_modules/
npm i --no-optional
npm dedupe
npm up
Refer to https://github.com/npm/npm/issues/19393 for more information.