notadmin@programming:~$ sudo npm install -g nave
[sudo] password for notadmin:
Sorry, try again.
[sudo] password for notadmin:
Sorry, try again.
[sudo] password for notadmin:
sudo: 3 incorrect password attempts
notadmin@programming:~$ su root
Password:
root@programming:/home/notadmin$ sudo npm install -g nave
[sudo] password for root:
/usr/bin/nave -> /usr/lib/node_modules/nave/nave.sh
+ nave@2.2.3
added 1 package from 6 contributors in 2.542s
root@programming:/home/notadmin$ node -v
v8.11.1
root@programming:/home/notadmin$ yarnb -v
Command 'yarnb' not found, did you mean:
command 'yarn' from deb cmdtest
Try: sudo apt install
root@programming:/home/notadmin$ yarn -v
1.6.0
root@programming:/home/notadmin$ sudo yarn global add @angular/cli
yarn global v1.6.0
[1/4] Resolving packages...
[2/4] Fetching packages...
[#######---------------------------------------------------------------] 24/257
https://blog.angular-university.io/getting-started-with-angular-setup-a-development-environment-with-yarn-the-angular-cli-setup-an-ide/
ng --version
ng --version
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 6.0.1
Node: 8.11.1
OS: linux x64
Angular:
...
Package Version
------------------------------------------------------
@angular-devkit/architect
@angular-devkit/core
@angular-devkit/schematics
@schematics/angular
@schematics/update
rxjs
sudo npm update -g @angular/cli
/usr/bin/ng -> /usr/lib/node_modules/@angular/cli/bin/ng
> @angular/cli@6.0.1 postinstall /usr/lib/node_modules/@angular/cli
> node ./bin/ng-update-message.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.3 (node_modules/@angular/cli/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
+ @angular/cli@6.0.1
updated 8 packages in 16.546s
f***K AT THE CONSTANT CHANGES
ng set --global packageManager=yarn
get/set have been deprecated in favor of the config command.
[sudo] password for notadmin:
Sorry, try again.
[sudo] password for notadmin:
Sorry, try again.
[sudo] password for notadmin:
sudo: 3 incorrect password attempts
notadmin@programming:~$ su root
Password:
root@programming:/home/notadmin$ sudo npm install -g nave
[sudo] password for root:
/usr/bin/nave -> /usr/lib/node_modules/nave/nave.sh
+ nave@2.2.3
added 1 package from 6 contributors in 2.542s
root@programming:/home/notadmin$ node -v
v8.11.1
root@programming:/home/notadmin$ yarnb -v
Command 'yarnb' not found, did you mean:
command 'yarn' from deb cmdtest
Try: sudo apt install
root@programming:/home/notadmin$ yarn -v
1.6.0
root@programming:/home/notadmin$ sudo yarn global add @angular/cli
yarn global v1.6.0
[1/4] Resolving packages...
[2/4] Fetching packages...
[#######---------------------------------------------------------------] 24/257
https://blog.angular-university.io/getting-started-with-angular-setup-a-development-environment-with-yarn-the-angular-cli-setup-an-ide/
ng --version
ng --version
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 6.0.1
Node: 8.11.1
OS: linux x64
Angular:
...
Package Version
------------------------------------------------------
@angular-devkit/architect
@angular-devkit/core
@angular-devkit/schematics
@schematics/angular
@schematics/update
rxjs
I struggled with the same problem just a minute ago. My project was generated using the v 1.6.0 of angular-cli.https://github.com/angular/angular-cli/issues/9307
npm update -g @angular/cli
editing my package.json changing the line
"@angular/cli": "1.6.0",
to
"@angular/cli": "^1.6.0",
npm update
did the trick.
sudo npm update -g @angular/cli
/usr/bin/ng -> /usr/lib/node_modules/@angular/cli/bin/ng
> @angular/cli@6.0.1 postinstall /usr/lib/node_modules/@angular/cli
> node ./bin/ng-update-message.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.3 (node_modules/@angular/cli/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
+ @angular/cli@6.0.1
updated 8 packages in 16.546s
f***K AT THE CONSTANT CHANGES
ng set --global packageManager=yarn
get/set have been deprecated in favor of the config command.
https://blog.angular-university.io/getting-started-with-angular-setup-a-development-environment-with-yarn-the-angular-cli-setup-an-ide/