When I run npm update -g generator-jhipster
in my Jhipster 2.27.2 application folder I am getting this error :
npm ERR! Linux 4.2.0-30-generic
npm ERR! argv "/usr/local/bin/node" "/usr/bin/npm" "update" "-g" "generator-jhipster"
npm ERR! node v5.6.0
npm ERR! npm v3.8.1
npm ERR! code EMISSINGARG
npm ERR! typeerror Error: Missing required argument #1
npm ERR! typeerror at module.exports (/usr/lib/node_modules/npm/lib/install/mutate-into-logical-tree.js:12:3)
npm ERR! typeerror at /usr/lib/node_modules/npm/lib/outdated.js:78:5
npm ERR! typeerror at /usr/lib/node_modules/npm/lib/outdated.js:62:20
npm ERR! typeerror at /usr/lib/node_modules/npm/node_modules/read-package-tree/rpt.js:186:9
npm ERR! typeerror at f (/usr/lib/node_modules/npm/node_modules/once/once.js:17:25)
npm ERR! typeerror at /usr/lib/node_modules/npm/node_modules/read-package-tree/rpt.js:152:20
npm ERR! typeerror at f (/usr/lib/node_modules/npm/node_modules/once/once.js:17:25)
npm ERR! typeerror at then (/usr/lib/node_modules/npm/node_modules/read-package-tree/rpt.js:121:22)
npm ERR! typeerror at /usr/lib/node_modules/npm/node_modules/read-package-tree/rpt.js:81:20
npm ERR! typeerror at fs.js:1653:23
npm ERR! typeerror This is an error with npm itself. Please report this error at:
npm ERR! typeerror <http://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /home/myUbuntu/dev/workspace/npm-debug.log
Is there something to configure before updating?
[UPDATE]
Solved by updating node.js to
node v5.6.0
npm v3.8.1
but now I am getting this issue
50112 error Linux 4.2.0-30-generic
50113 error argv "/usr/bin/nodejs" "/usr/bin/npm" "update" "-g" "generator-jhipster"
50114 error node v5.9.0
50115 error npm v3.7.3
50116 error path /usr/lib/node_modules/generator-jhipster/node_modules/yo/node_modules/yeoman-doctor/node_modules/bin-version-check/node_modules/.bin/semver
50117 error code EACCES
50118 error errno -13
50119 error syscall unlink
50120 error Error: EACCES: permission denied, unlink '/usr/lib/node_modules/generator-jhipster/node_modules/yo/node_modules/yeoman-doctor/node_modules/bin-version-check/node_modules/.bin/semver'
50120 error at Error (native)
50120 error { [Error: EACCES: permission denied, unlink '/usr/lib/node_modules/generator-jhipster/node_modules/yo/node_modules/yeoman-doctor/node_modules/bin-version-check/node_modules/.bin/semver']
50120 error errno: -13,
50120 error code: 'EACCES',
50120 error syscall: 'unlink',
50120 error path: '/usr/lib/node_modules/generator-jhipster/node_modules/yo/node_modules/yeoman-doctor/node_modules/bin-version-check/node_modules/.bin/semver',
50120 error parent: 'bin-version-check' }
50121 error Please try running this command again as root/Administrator.
I tested with sudo but with sudo I am getting the first issue again.
If you want to change your generator-jhipster package from Wanted to Latest version:
$ npm outdated -g
Package Current Wanted Latest Location
generator-jhipster 2.27.2 2.27.2 3.2.0
Run this command
$ npm install -g generator-jhipster
Related
I have had node and npm on my system for a while, but I haven't used them in a while and they seem to be broken.
Today I would like to get back to it and while trying to install yeoman, I got a message that "Your npm version is outdated." and advice to run npm install -g npm.
So I did that and got a lot more errors:
npm ERR! Darwin 15.3.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "npm"
npm ERR! node v4.4.0
npm ERR! npm v2.14.20
npm ERR! path /usr/local/lib/node_modules/npm/.mailmap
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall unlink
npm ERR! Error: EACCES: permission denied, unlink '/usr/local/lib/node_modules/npm/.mailmap'
npm ERR! at Error (native)
npm ERR! { [Error: EACCES: permission denied, unlink '/usr/local/lib/node_modules/npm/.mailmap']
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'unlink',
npm ERR! path: '/usr/local/lib/node_modules/npm/.mailmap' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! error rolling back Error: EACCES: permission denied, unlink '/usr/local/lib/node_modules/npm/.npmignore'
npm ERR! error rolling back at Error (native)
npm ERR! error rolling back { [Error: EACCES: permission denied, unlink '/usr/local/lib/node_modules/npm/.npmignore']
npm ERR! error rolling back errno: -13,
npm ERR! error rolling back code: 'EACCES',
npm ERR! error rolling back syscall: 'unlink',
npm ERR! error rolling back path: '/usr/local/lib/node_modules/npm/.npmignore' }
npm ERR! Please include the following file with any support request:
npm ERR! /Users/Dan/npm-debug.log
I then tried this too
// ♥ unlink '/usr/local/lib/node_modules/npm/.mailmap'
unlink: /usr/local/lib/node_modules/npm/.mailmap: Permission denied
Honestly, I can't remember whether I installed node with Homebrew or what else is on this thing. I think at some point I installed a node version manager but I could be wrong. Also, I always get nervous following instructions that say to use sudo. I can never remember which instructions to use sudo I'm supposed to not follow.
Any ideas?
Use sudo.
sudo npm install -g npm
All set. I just followed these instructions from John Papa and it's working now.
I am having many npm errors in the terminal while installing Apache cordova in my mac. I have also tried sudo npm install -g cordova but it's the same and Cordova is not installed while using Cordova --version
npm ERR! Darwin 14.3.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "cordova"
npm ERR! node v4.3.0
npm ERR! npm v2.14.12
npm ERR! path /Users/macmini/.node/bin/cordova
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall unlink
npm ERR! Error: EACCES: permission denied, unlink '/Users/macmini/.node/bin/cordova'
npm ERR! at Error (native)
npm ERR! { [Error: EACCES: permission denied, unlink '/Users/macmini/.node/bin/cordova']
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'unlink',
npm ERR! path: '/Users/macmini/.node/bin/cordova' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! error rolling back Error: EACCES: permission denied, unlink '/Users/macmini/.node/bin/cordova'
npm ERR! error rolling back at Error (native)
npm ERR! error rolling back { [Error: EACCES: permission denied, unlink '/Users/macmini/.node/bin/cordova']
npm ERR! error rolling back errno: -13,
npm ERR! error rolling back code: 'EACCES',
npm ERR! error rolling back syscall: 'unlink',
npm ERR! error rolling back path: '/Users/macmini/.node/bin/cordova' }
npm ERR! Please include the following file with any support request:
npm ERR! /Users/macmini/npm-debug.log
~ $ npm install -g yo
npm ERR! Darwin 14.3.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "yo"
npm ERR! node v0.12.5
npm ERR! npm v2.14.0
npm ERR! path /usr/local/lib/node_modules/yo
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! Error: EACCES, rmdir '/usr/local/lib/node_modules/yo'
npm ERR! at Error (native)
npm ERR! { [Error: EACCES, rmdir '/usr/local/lib/node_modules/yo']
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! path: '/usr/local/lib/node_modules/yo' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! error rolling back Error: EACCES, rmdir '/usr/local/lib/node_modules/yo'
npm ERR! error rolling back at Error (native)
npm ERR! error rolling back { [Error: EACCES, rmdir '/usr/local/lib/node_modules/yo']
npm ERR! error rolling back errno: -13,
npm ERR! error rolling back code: 'EACCES',
npm ERR! error rolling back path: '/usr/local/lib/node_modules/yo' }
npm ERR! Please include the following file with any support request:
npm ERR! /Users/Jagadeesh/npm-debug.log
Instead run the command as npm install -g yo. The error you are getting says:
"npm ERR! Please try running this command again as root/Administrator."
You will need to run as root to install this.
I'm following facebook's tutorial on getting started with React Native (https://facebook.github.io/react-native/docs/tutorial.html#hello-world), but I can't get the react-native-cli to install. Any help interpreting the error messages? Obviously it says to unlink something, but I don't know what it is linked to that it shouldn't be linked to.
Running as root seems to do something, but zsh still won't recognize the react-native command.
➜ ~ npm install -g react-native-cli
npm ERR! Darwin 14.3.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "react-native-cli"
npm ERR! node v0.12.4
npm ERR! npm v2.10.1
npm ERR! path /Users/bbarclay/.node/bin/react-native
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! Error: EACCES, unlink '/Users/bbarclay/.node/bin/react-native'
npm ERR! at Error (native)
npm ERR! { [Error: EACCES, unlink '/Users/bbarclay/.node/bin/react-native']
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! path: '/Users/bbarclay/.node/bin/react-native' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! error rolling back Error: EACCES, unlink '/Users/bbarclay/.node /bin/react-native'
npm ERR! error rolling back at Error (native)
npm ERR! error rolling back { [Error: EACCES, unlink '/Users/bbarclay/.node/bin/react-native']
npm ERR! error rolling back errno: -13,
npm ERR! error rolling back code: 'EACCES',
npm ERR! error rolling back path: '/Users/bbarclay/.node/bin/react-native' }
npm ERR! Please include the following file with any support request:
npm ERR! /Users/bbarclay/npm-debug.log
➜ ~ sudo npm install -g react-native-cli
Password:
/Users/bbarclay/.node/bin/react-native -> /Users/bbarclay/.node/lib/node_modules/react-native-cli/index.js
react-native-cli#0.1.4 /Users/bbarclay/.node/lib/node_modules/react-native-cli
└── prompt#0.2.14 (revalidator#0.1.8, pkginfo#0.3.0, read#1.0.6, winston#0.8.3, utile#0.2.1)
➜ ~ react-native init AwesomeProject
zsh: command not found: react-native
Add the admin permission to .npm home directory.
sudo chown -R $(whoami) ~/.npm
I apologize as i am still in the process of learning how to use ubuntu.
First i installed npm, then i installed git.
then i tried to clone a repo from git.
Then i typed the following into terminal "bower install bootstrap".
I already had the source of bootstrap downloaded in a zip file.
I received the following error:-
npm ERR! error rolling back Error: EACCES, unlink '/usr/local/bin/bower'
npm ERR! error rolling back bower#1.3.8 { [Error: EACCES, unlink '/usr/local/bin/bower'] errno: 3, code: 'EACCES', path: '/usr/local/bin/bower' }
npm ERR! Error: EACCES, unlink '/usr/local/bin/bower'
npm ERR! { [Error: EACCES, unlink '/usr/local/bin/bower'] errno: 3, code: 'EACCES', path: '/usr/local/bin/bower' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Linux 3.13.0-32-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "bower"
npm ERR! cwd /home/haaggis
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! path /usr/local/bin/bower
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, unlink '/usr/local/bin/bower'
npm ERR!
npm ERR! Additional logging details can be found in:
What am i doing wrong ?
Typing "npm install -g bower" into the terminal produces the above error.
And this stops me from entering "bower install bootstrap"
Please try running this command again as root/Administrator.
So, what happened when you tried sudo npm install -g bower ?