How to upgrade NPM


#1

NPM version on my system is 2.14.12. Can I upgrade it to > 3.0


Vue CLI not working
#2

you can run npm i npm -g, same as on any other computer


#3

npm ERR! Linux 4.2.0-c9
npm ERR! argv “/nix/store/ajr6i77s89gjfjm59aazc16b5rvb39n7-nodejs-4.3.1/bin/node” “/mnt/shared/sbin/npm” “i” “npm” "-g"
npm ERR! node v4.3.1
npm ERR! npm v2.14.12
npm ERR! path /nix/store/ajr6i77s89gjfjm59aazc16b5rvb39n7-nodejs-4.3.1/bin/npm
npm ERR! code EROFS
npm ERR! errno -30
npm ERR! syscall unlink

npm ERR! rofs EROFS: read-only file system, unlink '/nix/store/ajr6i77s89gjfjm59aazc16b5rvb39n7-nodejs-4.3.1/bin/npm’
npm ERR! rofs This is most likely not a problem with npm itself
npm ERR! rofs and is related to the file system being read-only.
npm ERR! rofs
npm ERR! rofs Often virtualized file systems, or other file systems
npm ERR! rofs that don’t support symlinks, give this error.
npm ERR! error rolling back Error: EROFS: read-only file system, unlink '/nix/store/ajr6i77s89gjfjm59aazc16b5rvb39n7-nodejs-4.3.1/bin/npm’
npm ERR! error rolling back at Error (native)
npm ERR! error rolling back { [Error: EROFS: read-only file system, unlink ‘/nix/store/ajr6i77s89gjfjm59aazc16b5rvb39n7-nodejs-4.3.1/bin/npm’]
npm ERR! error rolling back errno: -30,
npm ERR! error rolling back code: ‘EROFS’,
npm ERR! error rolling back syscall: ‘unlink’,
npm ERR! error rolling back path: ‘/nix/store/ajr6i77s89gjfjm59aazc16b5rvb39n7-nodejs-4.3.1/bin/npm’ }

npm ERR! Please include the following file with any support request:
npm ERR! /home/ubuntu/workspace/react/npm-debug.log
(rippling)ubuntu@myprasanna-rippling-main-mohit-3537253:~/workspace/react$ cd …
(rippling)ubuntu@myprasanna-rippling-main-mohit-3537253:~/workspace$ npm i npm -g
npm ERR! Linux 4.2.0-c9
npm ERR! argv “/nix/store/ajr6i77s89gjfjm59aazc16b5rvb39n7-nodejs-4.3.1/bin/node” “/mnt/shared/sbin/npm” “i” “npm” "-g"
npm ERR! node v4.3.1
npm ERR! npm v2.14.12
npm ERR! path /nix/store/ajr6i77s89gjfjm59aazc16b5rvb39n7-nodejs-4.3.1/bin/npm
npm ERR! code EROFS
npm ERR! errno -30
npm ERR! syscall unlink

npm ERR! rofs EROFS: read-only file system, unlink '/nix/store/ajr6i77s89gjfjm59aazc16b5rvb39n7-nodejs-4.3.1/bin/npm’
npm ERR! rofs This is most likely not a problem with npm itself
npm ERR! rofs and is related to the file system being read-only.
npm ERR! rofs
npm ERR! rofs Often virtualized file systems, or other file systems
npm ERR! rofs that don’t support symlinks, give this error.
npm ERR! error rolling back Error: EROFS: read-only file system, unlink '/nix/store/ajr6i77s89gjfjm59aazc16b5rvb39n7-nodejs-4.3.1/bin/npm’
npm ERR! error rolling back at Error (native)
npm ERR! error rolling back { [Error: EROFS: read-only file system, unlink '/nix/store/ajr6i77s89gjfjm59aazc16b5rvb39n7-nodejs-4.3.1/bin


#4

strange, it should use nvm by default, if you do not have it install it first.