Unable to install Cordova and Ionic

I am having trouble installing Cordova and Ionic. I downloaded version 6.10.3 LTS of Node.js, and I downloaded Git (which was recommended by this website http://blog.ionic.io/new-to-the-command-line/?_ga=2.21826683.1946957479.1495320592-1587373635.1495308867, linked to by the Ionic Framework website). When I ran Git, I typed “npm install -g cordova ionic” into the prompt, and it returned “npm WARN deprecated node-uuid@1.4.8: Use uuid module instead”. I decided to try to type it in cmd.exe, and it returned the same thing and a bunch of other lines containing errors (I can screenshot the lines if needed). After all that, I looked up the problem on google, and visited many websites and youtube videos for help, however none of them were succesful at helping me with my issue.

I am using Windows 7.

The warning about node-uuid is benign and can safely be ignored. If you’re just getting started with node, I highly recommend installing nvm-windows. It will eliminate many puzzling environment errors.

Thank you for the help, however even after it says the node-uuid, it still doesn’t recognize ionic as a key word, and therefore i can’t create a new App. I’ll try installing the nvm-windows, but i still don’t think it will work.

hello kazuto,

go back to the full ionic create “your app” after you updated all in windows. You’ll be in Ionic 3 then.

That suggests to me that it’s a path issue (or whatever Windows calls “how you figure out what command lives where”). nvm-windows should help with that.

Alright ty, I’ll try to figure out tomorrow, but thanks for all the help :slight_smile:

You’re welcome Kazuto :slight_smile:

I changed the directory to the npm directory and tried again, but I am still getting the errors. Here is a snapshot of the errors reported:

$ npm install -g cordova ionic
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead

C:\Users\user\AppData\Roaming\npm
-- ionic@3.1.2 +-- @ionic/cli-utils@1.1.2 +-- opn@4.0.2– tar@2.2.1

npm ERR! Windows_NT 6.1.7601
npm ERR! argv “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js” “install” “-g” “cordova” "ionic"
npm ERR! node v6.10.3
npm ERR! npm v3.10.10
npm ERR! path C:\Users\user\AppData\Roaming\npm\node_modules\cordova
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall rename

npm ERR! Error: EPERM: operation not permitted, rename ‘C:\Users\user\AppData\Roaming\npm\node_modules\cordova’ -> 'C:\Users\user\AppData\Roaming\npm\node_modules.cordova.DELETE’
npm ERR! at moveAway (C:\Program Files\nodejs\node_modules\npm\lib\install\action\finalize.js:38:5)
npm ERR! at destStatted (C:\Program Files\nodejs\node_modules\npm\lib\install\action\finalize.js:27:7)
npm ERR! at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:267:18
npm ERR! at FSReqWrap.oncomplete (fs.js:123:15)
npm ERR!
npm ERR! Error: EPERM: operation not permitted, rename ‘C:\Users\user\AppData\Roaming\npm\node_modules\cordova’ -> 'C:\Users\user\AppData\Roaming\npm\node_modules.cordova.DELETE’
npm ERR! at Error (native)
npm ERR! Error: EPERM: operation not permitted, rename ‘C:\Users\user\AppData\Roaming\npm\node_modules\cordova’ -> 'C:\Users\user\AppData\Roaming\npm\node_modules.cordova.DELETE’
npm ERR! at moveAway (C:\Program Files\nodejs\node_modules\npm\lib\install\action\finalize.js:38:5)
npm ERR! at destStatted (C:\Program Files\nodejs\node_modules\npm\lib\install\action\finalize.js:27:7)
npm ERR! at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:267:18
npm ERR! at FSReqWrap.oncomplete (fs.js:123:15)
npm ERR!
npm ERR! Error: EPERM: operation not permitted, rename ‘C:\Users\user\AppData\Roaming\npm\node_modules\cordova’ -> 'C:\Users\user\AppData\Roaming\npm\node_modules.cordova.DELETE’
npm ERR! at Error (native)
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:
npm ERR! C:\Program Files\nodejs\npm-debug.log

Did you get your node installation all managed by nvm-windows?

  1. Do what @rapropos says, it will really fix a lot of your problems. I use it myself.
  2. Maybe ignore what the blog post is saying and just use PowerShell instead of the git shell. I and many other Windows devs are using it and are very happy. (Just type “Powershell” in the start menu to find it)

Hi guys,
I am getting a similar issue when running npm install for my ionic repository in windows. My error log is:

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“win32”,“arch”:“x64”})
npm ERR! Windows_NT 10.0.10586
npm ERR! argv “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js” "install"
npm ERR! node v6.10.3
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! @ionic/cli-plugin-cordova@1.0.0-beta0 postinstall: node ./bin/postinstall
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ionic/cli-plugin-cordova@1.0.0-beta0 postinstall script ‘node ./bin/postinstall’.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the @ionic/cli-plugin-cordova package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./bin/postinstall
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs @ionic/cli-plugin-cordova
npm ERR! Or if that isn’t available, you can get their info via:
npm ERR! npm owner ls @ionic/cli-plugin-cordova
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\xampp\htdocs\ourmgmt2-mobile\npm-debug.log

I tried installing nvm-window. Once installed is there anything else I need to do?

Then you use it to install node again - you can then have multiple node versions installed at the same time. Use our favourite one and install ionic and cordova again.

This is strange, you can safely remove the -beta0 and probably even update this to 1.2.0. Check here for current versions: Releases · ionic-team/ionic-cli · GitHub