You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mac on latest El Capitan
node v6.2.2 with npm 3.10.2
Repro steps.
trying to upgrading to latest cli tools (sudo npm install -g angular-cli or sudo npm update -g angular-cli not sure which i run)
angular-cli / npm broken
reintalling node
trying to install angular-cli again
intallation allways fails
Error
$ sudo npm install -g angular-cli
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
/usr/local/lib
└── (empty)
npm ERR! Darwin 15.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "angular-cli"
npm ERR! node v6.2.2
npm ERR! npm v3.10.2
npm ERR! path /usr/local/lib/node_modules/.staging/abbrev-432cdd5a
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/.staging/abbrev-432cdd5a' -> '/usr/local/lib/node_modules/angular-cli/node_modules/ember-cli/node_modules/npm/node_modules/abbrev'
npm ERR! enoent ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/.staging/abbrev-432cdd5a' -> '/usr/local/lib/node_modules/angular-cli/node_modules/ember-cli/node_modules/npm/node_modules/abbrev'
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! /Users/manuelfink/git/angular-2-cli-test/ContentFlows/npm-debug.log
npm ERR! code 1
Reacted by Meistercoach83, Nikola Brežnjak, Michael Lehmann, Rolando Quintero, Manuel Pacheco, Reginald Davis, Mariusz Kotas, Alexandre Rozier, Per Ström, Vladimir Makushev and 6 more
Reacted by Rakhat Rakhmetov, Nicolas Coutin and shriram9494
This worked for me in the latest versions as well.
Original quick fix: reinstalling node
Somehow in earlier angular-cli version it seemed to me angular-cli somehow broke node installation. Manual fix, uninstalling and reinstalling node completely fixed the issue for me. hope i didn't forget anything:
Reacted by Rishikesh Gajam, Jairo Gil , Anastasia, Abhishek Sharma, aitor, shubhangisheel, Ľuboš Pittner, Felix Griewald, MaironBrasil, Dmytro Samoilov and 13 more
Reacted by Daniel Li, Alexander Levchenko and Ritesh Singh
Reacted by KingTigerXCII, Jairo Gil , Jacobo Tarragón, Abhishek Sharma, stepan, Dmytro Samoilov, Pedro Luz, Daniel Li, Alexander Levchenko and thanh-tl
Reacted by Jairo Gil , Nipuna H Herath, Pedro Luz, Thiago Bueno and Alexander Levchenko
is very off-putting, a negative quality signal. Many, many developers upgrade many NPM packages every day, without throwing away their NPM cache (!!).
To make these instruction confidence-inspiring, there should be:
Explanation, even brief, of why this package (unlike countless others) requires throwing away the whole NPM cache for each upgrade.
Hopefully a pointer to some known NPM defect that temporarily justifies the instructions.
Reacted by Wenchen Li, Michael Prentice, Moshiour Rahman, Anton Huck, Jonathan Cox, Rishikesh Gajam, Andrew Brown, Guy Newman, David Lizárraga, Jacobo Tarragón and 10 more
@nikokosh and @davidrensh solution worked for me as well. No need to reinstall npm, or node. Simply npm uninstall -g angular-cli then npm install -g angular-cli
The fixes mentioned here work for me too, but they happen again as soon as I try to run npm install or npm update after the fix. Can someone confirm if this happens too?
Reacted by Sachin Saluja, Jonny Heavey, Manuel Fink and jessewalia
In my case, I first changed my node version to 6.6.0 with npm 3.10.3. And then I changed my permissions of the location where node is located using this link : https://docs.npmjs.com/getting-started/fixing-npm-permissions
I again got an error similar to this trail and then i finally uninstalled and installed angular-cli using npm, and finally it worked ! :)
I can also confirm that after a failed angular-cli install due to this problem, if you uninstall angular-cli via npm and then reinstall angular-cli globally it works (or worked...for me...once).
Reinstall -g angular-cli doesn't help me on win 8.1, node 4+, npm 3+. I get the same error. In the same time if I open location of angular-cli, on my pc and start ng new path\to\app from this location it actually creates folder and install dependencies
+1 on sierra, uninstalled node/npm with the steps above, reinstalled node v7. installing ngcli still threw lots of errors on dependencies but the fallbacks seemed to work out pretty good.
Fixed the same error in multiple locations by deleting node_modules, package-lock.json and running npm i again.
I was haiving these errors due to bumping up versions on dependencies i had.
angular-automatic-lock-bot commented on Sep 8, 2019
Activity
mikeybyker commentedon Jun 24, 2016
+1
manuelfink commentedon Jun 24, 2016
UPDATE: uninstalling and reinstalling angular-cli should fix the issue:
as mentioned by @nikokosh and @davidrensh below try:
This worked for me in the latest versions as well.
Original quick fix: reinstalling node
Somehow in earlier angular-cli version it seemed to me angular-cli somehow broke node installation. Manual fix, uninstalling and reinstalling node completely fixed the issue for me. hope i didn't forget anything:
kylecordes commentedon Jun 24, 2016
Related to this: the procedure in the "upgrade guide":
https://github.com/angular/angular-cli#updating-angular-cli
is very off-putting, a negative quality signal. Many, many developers upgrade many NPM packages every day, without throwing away their NPM cache (!!).
To make these instruction confidence-inspiring, there should be:
alexciesielski commentedon Jun 24, 2016
+1, Windows 10, running cmd as admin
npm v3.8.1
node v5.7.0
KingTigerXCII commentedon Jun 24, 2016
+1
El Capitan,
npm 3.9.5,
node 6.2.2
@manuelfink thank you very much, works fine! :)
filipesilva commentedon Jul 4, 2016
@manuelfink Very weird that it's breaking the global npm... I'll flag this as urgent but I don't have a linux machine to debug myself.
@kylecordes Angular-CLI uses the same upgrade guide as Ember-CLI because it is essentially an Ember-CLI addon. See https://github.com/ember-cli/ember-cli/releases
coxjonc commentedon Jul 12, 2016
+1
El Capitan,
npm 3.10.5
node 6.3.0
aeb0 commentedon Jul 14, 2016
+1
Yosemite
npm 3.5.3
node 5.5.0
kylecordes link works for fix:
https://github.com/angular/angular-cli#updating-angular-cli
anas7asia commentedon Aug 16, 2016
I had the same problem on El Capitan
node 6.2.1
npm 3.9.3.
It was solved by simple uninstall of angular-cli:
sudo npm uninstall -g angular-cliAnd its immediate reinstalling:
sudo npm install -g angular-cliWithout npm reinstalling you can keep your cache and all the dependencies as it was.
davidrensh commentedon Aug 17, 2016
Solved by (nothing else):
npm uninstall -g angular-cli
npm install -g angular-cli
mac-bhaird commentedon Aug 18, 2016
+1
Windows 10 64 bit
Also solved by @davidrensh solution:
npm uninstall -g angular-cli
npm install -g angular-cli
roelvanlisdonk commentedon Aug 23, 2016
I had the same problem and it was also solved by @davidrensh solution:
npm uninstall -g angular-cli
npm install -g angular-cli
windows 10 64 bit
node v6.4.0
npm v3.10.3
looselytyped commentedon Aug 28, 2016
@nikokosh and @davidrensh solution worked for me as well. No need to reinstall
npm, ornode. Simplynpm uninstall -g angular-clithennpm install -g angular-cliShadowManu commentedon Sep 13, 2016
The fixes mentioned here work for me too, but they happen again as soon as I try to run
npm installornpm updateafter the fix. Can someone confirm if this happens too?manuelfink commentedon Oct 3, 2016
@filipesilva @ShadowManu I can confirm, still having the same issue every time I try to update angular-cli I ran across the problem.
shubhangisheel commentedon Oct 6, 2016
In my case, I first changed my node version to 6.6.0 with npm 3.10.3. And then I changed my permissions of the location where node is located using this link : https://docs.npmjs.com/getting-started/fixing-npm-permissions
I again got an error similar to this trail and then i finally uninstalled and installed angular-cli using npm, and finally it worked ! :)
lorenjerickson commentedon Oct 10, 2016
I can also confirm that after a failed angular-cli install due to this problem, if you uninstall angular-cli via npm and then reinstall angular-cli globally it works (or worked...for me...once).
Window 10
Node 6.x
Npm 3.x
atebitftw commentedon Oct 14, 2016
@manuelfink The uninstall/reinstall worked for me on Windows 10 with node 6.x/npm 3.x. Weird, but whatevs, it's working. Thank you.
anisa07 commentedon Oct 23, 2016
Reinstall -g angular-cli doesn't help me on win 8.1, node 4+, npm 3+. I get the same error. In the same time if I open location of angular-cli, on my pc and start ng new path\to\app from this location it actually creates folder and install dependencies
34r7h commentedon Oct 27, 2016
+1 on sierra, uninstalled node/npm with the steps above, reinstalled node v7. installing ngcli still threw lots of errors on dependencies but the fallbacks seemed to work out pretty good.
Currently working after above steps.
hansl commentedon Dec 21, 2016
Closing this as obsolete. This is an NPM issue.
tmcpro commentedon Feb 16, 2017
fixed by updating npm
n-sikka commentedon Aug 29, 2018
Fixed the same error in multiple locations by deleting
node_modules,package-lock.jsonand runningnpm iagain.I was haiving these errors due to bumping up versions on dependencies i had.
angular-automatic-lock-bot commentedon Sep 8, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.