2
votes

solution i tried

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

but it doesn't work for me .

does it is npm bug or angular2. enter image description here

please suggest.

error

unexpected end of input at 1:13267

i also tried with ;https://angular.io/docs/ts/latest/guide/setup.html.

  • npm install not working enter image description here
1
follow this medium.com/@julyseven2002/… i think it will helpfull - Ajay

1 Answers

2
votes

You can try to uninstall wrong packages by:

npm uninstall -g angular-cli          # Remove global package
npm uninstall --save-dev angular-cli  # Remove from package.json

npm uninstall -g @angular/cli         # Remove global package
npm uninstall --save-dev @angular/cli # Remove from package.json

rm -rf node_modules dist # Use rmdir on Windows
npm cache clean

And now:

 npm install npm@latest -g                   #update npm
 npm install -g @angular/cli@latest          # Global package
 npm install --save-dev @angular/cli@latest  # Local package
 npm install                                 # Restore removed dependencies 

More information can be found here: https://github.com/angular/angular-cli/wiki/stories-1.0-update