Error while installing yeoman
Asked Answered
M

2

11

I am trying to install yo on my ubuntu v16.4 LTS but i get this error:

npm WARN deprecated [email protected]: this package has been reintegrated into npm and is now out of date with respect to npm
npm ERR! Linux 4.4.0-22-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "yo"
npm ERR! node v6.2.0
npm ERR! npm  v3.9.0
npm ERR! path /usr/local/lib/node_modules/yo/lib/cli.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod

npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/yo/lib/cli.js'
npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/yo/lib/cli.js'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! Please include the following file with any support request:
npm ERR!     /home/momor1/npm-debug.log

As you see, I have the latest npm and nodejs, and I am in root mode so I still don't get it why its throwing this error. Any help please:)

Martsen answered 18/5, 2016 at 10:23 Comment(14)
https://mcmap.net/q/135504/-npm-install-errors-with-error-enoent-chmod/297087Floatable
Ok, i am also getting same error :(, please let me know if you fixed the issue.Floatable
I have the same error on OS X 10.11.5 (El Capitan) with Node 4.4.4 and nam 3.9.0. Clean install from node-v4.4.4.pkg.Gaelic
thats really wierd! @ChristianJunkMartsen
Same issue on Ubuntu 14.04. Tried node v0.12 and node v6.x from nodesource ppa github.com/nodesource/distributions.Ophthalmia
Does this happen with other global installations too?Pellicle
Yeah, its happening with global installations tooMartsen
How did you install nodejs?Pellicle
@littlepootis from ubuntu terminal and i have the latest version 6.2Martsen
Apparently, this is a bug that hasn't been fixed yet: github.com/yeoman/yo/issues/437Pellicle
yeah i can see this nowMartsen
My real issue was sudo grunt serve was not working. I have fixed it using "grunt-connect-proxy": "git://github.com/ruiaraujo/grunt-connect-proxy#patch-1", Ref :- github.com/drewzboto/grunt-connect-proxy/issues/95Floatable
did u install the latest version? 1.8.2 ?Martsen
No, i haven't mentioned the version in package just "grunt-connect-proxy": "git://github.com/ruiaraujo/grunt-connect-proxy#patch-1",Floatable
G
13

It seems that this error occurs when you are trying to install the latest version, which was released today (2016/04/18): 1.8.2

Please try to install the previous version:

sudo npm install -g [email protected]

This is working for me now. Tested on a clean virtual machine with OS X El Capitan v10.11.2, node 4.4.4 and npm 3.9.0 and on my developer machine with OS X 10.11.5.

Gaelic answered 18/5, 2016 at 11:50 Comment(3)
This worked for me. @Martsen try npm cache clean first? I was able to confirm on my build server that the problem started once the yo package was upgraded from 1.8.1 to 1.8.2Private
i still get the same even if i do npm cache clean, how did you upgrade from 18.1 to 1.8.2?Martsen
YSK it's considered a Bad Idea to install npm modules with sudo; here are instructions for working around it competa.com/blog/2014/12/how-to-run-npm-without-sudoJimmiejimmy
M
0

Thanks to @jcollum to help me find the solution, the problem was that yo needed to install some plugins in sudo mode (this was not possible since installation was automatic by yo). Setting the prefix of npm to home would solve the issue of using sudo each time u need to install new package. Just follow this tutorial and you should be able to install [email protected]. Best of Luck http://www.competa.com/blog/2014/12/how-to-run-npm-without-sudo/

Martsen answered 19/5, 2016 at 8:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.