Not able to install Ionic and Cordova using NPM on Windows 10


#1

Not able to install Ionic and Cordova using NPM on Windows 10

Hi guys,

I am new to ionic2 Development. I have installed visual studio 2017 on windows 10.
In VS2017 Cordova/Ionic2 Project is working Fine.

But the problem is , i want to Create and run Ionic project through CLI on Browser.

I Started from Here.

Run CLI Command : npm install -g ionic cordova

Getting Error while Installing Ionic and Cordova on Windows 10

I am searhing and looking for Resolution for last 3 days but did not find any thing.

Pleasee Help Me to resolve this issue…!!!


#2

It won’t work with npm 2. Do this:

  1. Install nvm-for-windows
  2. Install the current LTS of NodeJS
  3. Try again in that environment.

#3

Find the cmd.exe in the start-menu, right-click and ‘Run as administrator’…then try to install…let’s first try that…


#4

I try this but again getting Error …


#5

I installed nvm and current LTS of NodeJs and
Run CLI Command : npm install -g ionic cordova

Getting Same Error.

If i did anything wrong in command please guide.


#6

If you ran npm 2 as administrator, then you might have a lot of cleanup to do. Delete by hand your node-modules folder. Then in the command line:

npm cache clean --force
npm install -g npm
npm install -g ionic cordova

That will probably work. Also, don’t run any of this as administrator. If you do an admin install, and you need to clean it up later, it’s hard to do.