3

I'm trying to update my angular-cli version running

npm install -g angular-cli@1.0.0-beta.20-4

but when I run ng-v: I'm get the error:

Could not start watchman; falling back to NodeWatcher for file system events.

Visit http://ember-cli.com/user-guide/#watchman for more info.

angular-cli: 1.0.0-beta.15

node: 7.1.0

os: linux x64

How can I fix this?

Community
  • 1
  • 1
Pamela Pereyra
  • 101
  • 1
  • 10

1 Answers1

2

When you run angular-cli you have to run the same version globally as locally. I have had many problems with this. I do not know if this is how it is intended to run but I do know it causes problems for sure!

When installing globally you make sure you update local as well.

So what I do is,

npm uninstall -g angular-cli
npm cache clean
npm install -g angular-cli@latest

Then I remove the npm_moduels folder. Then I run,

 npm install angular-cli@latest --save

Now the local version and global version match.

Based on this method I would remove it from the package.json and once you run the final command to install it locally with --save it will add it back with the correct version.

WARNING!

When you update angular-cli it very well could break your app. If this happens check your other dependencies and make sure they work with the new version of angular-cli you are now running.

Update Angular-cli

wuno
  • 9,547
  • 19
  • 96
  • 180
  • 1
    To expand on this a little, it's easier if you update the global angular-cli *outside* of any directory that has a `node_modules` folder. I somehow had a `node_modules/` in my home dir, and couldn't update the global cli from there for that reason. – filoxo Nov 21 '16 at 02:46
  • As Oswaldo Salazar said [here](https://stackoverflow.com/a/42460837/4345461) now it's *@angular/cli*, so it's: npm install -g @angular/cli@latest Thanks :) – Filip Savic Aug 16 '18 at 16:11