rushtoni88
rushtoni88

Reputation: 4665

Fresh install of npm and node

I have recently started working with Angular 2 and am unable to get the Angular 2 Quickstart project to run correctly due to a number of errors in my npm dependencies.

Am I able to globally uninstall everything that was previously installed with npm to allow me to do a clean install of it and any required dependencies?

Note: The errors are the same as these examples which are caused by packages needing to be installed globally, however, the errors still occur having followed these steps...

Upvotes: 5

Views: 15572

Answers (2)

Anselm Stordeur
Anselm Stordeur

Reputation: 80

To check your global installed packages you can type:

npm ls -g --depth=0

That lists all global installed packages with depth=0. That mean that it doesn't output dependencies of the packages. You can uninstall global packages with:

npm uninstall -g package-name

Please do not uninstall the npm package itself... But you can update your npm version with npm:

npm install npm -g

As mentioned in the Article your Node.js version should be at least v4.x.x and the npm version should be v3.x.x. You can get the installed versions with these commands:

node -v
npm -v

Updating your Node.js depends on your Operating System. Assuming that you use Windows you should uninstall the current version via control panel and download an actual release from the official Node.js page. https://nodejs.org/en/download/current/

To get a great overview how npm works you should consider reading their documentation: https://docs.npmjs.com/

Upvotes: 6

hholtij
hholtij

Reputation: 2936

Make sure you have the correct node.js version. The guide says 5.0 or greater but points you to the wrong download link. Try this: https://nodejs.org/en/download/current/

With this node you should be able to follow the guide step by step.

Upvotes: 0

Related Questions