Angular-cli: cannot find module 'abbrev' after installation of Angular CLI RC4

Created on 23 Mar 2017  路  3Comments  路  Source: angular/angular-cli

Bug Report or Feature Request (mark with an x)

- [x ] bug report -> please search issues before submitting
- [ ] feature request

Versions.

image

Ubuntu 16.04

node -v
v6.10.1

npm -v
3.10.10

Repro steps.

run npm install -g @angular/cli@latest
run ng -v

The log given by the failure.

Desired functionality.

Mention any other details that might be useful.

Most helpful comment

I also had this same problem what I did to fix it on Linux Mint:

  • change ownership of /usr/lib/node_modules to my user to stop executing npm with sudo as this is highly discouraged.
  • run npm uninstall -g @angular/cli and npm cache clean (--force)
  • check if ~/.npm was clean, else rm -rf ~/-npm
  • try reinstalling npm install -g @angular/cli
  • go to ...node_modules/angular-cli and run npm install
  • run npm install --save-dev @angular/cli@latest
  • and finally i can run ng -v with no error..

but this was quite a lot of trouble I faced lol, I'm posting this here so maybe it helps other people

*Edit: *
I think many of these problems could possibly be avoided when you configure your npm's default directory according to their installation instructions on the website.

https://docs.npmjs.com/getting-started/fixing-npm-permissions#option-2-change-npms-default-directory-to-another-directory

All 3 comments

I think this is a dupe of an old issue: https://github.com/angular/angular-cli/issues/1190. It seems to be a problem with npm.

I also had this same problem what I did to fix it on Linux Mint:

  • change ownership of /usr/lib/node_modules to my user to stop executing npm with sudo as this is highly discouraged.
  • run npm uninstall -g @angular/cli and npm cache clean (--force)
  • check if ~/.npm was clean, else rm -rf ~/-npm
  • try reinstalling npm install -g @angular/cli
  • go to ...node_modules/angular-cli and run npm install
  • run npm install --save-dev @angular/cli@latest
  • and finally i can run ng -v with no error..

but this was quite a lot of trouble I faced lol, I'm posting this here so maybe it helps other people

*Edit: *
I think many of these problems could possibly be avoided when you configure your npm's default directory according to their installation instructions on the website.

https://docs.npmjs.com/getting-started/fixing-npm-permissions#option-2-change-npms-default-directory-to-another-directory

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._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

delasteve picture delasteve  路  3Comments

IngvarKofoed picture IngvarKofoed  路  3Comments

rajjejosefsson picture rajjejosefsson  路  3Comments

donaldallen picture donaldallen  路  3Comments

hareeshav picture hareeshav  路  3Comments