Npm error after update ionic 2

Last time i tried ionic 2 without any problem but now when i updated ionic 2 i cant start an app. When i do “ionic start something blank --v2” i get this:

One awesome Ionic app coming right up...

Downloading: https://github.com/driftyco/ionic2-app-base/archive/master.zip
[=============================]  100%  0.0s
Downloading: https://github.com/driftyco/ionic2-starter-blank/archive/master.zip
Installing Node Modules

Unable to run exec commandError: Command failed: C:\WINDOWS\system32\cmd.exe /s /c "npm install"
npm WARN package.json @ No description
npm WARN package.json @ No repository field.
npm WARN package.json @ No README data
npm WARN package.json @ No license field.
npm WARN optional dep failed, continuing fsevents@1.0.8
npm WARN deprecated graceful-fs@3.0.8: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.
npm WARN deprecated lodash@1.0.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
npm WARN deprecated graceful-fs@1.2.3: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.
npm WARN deprecated npmconf@2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm
npm WARN optional dep failed, continuing fsevents@1.0.8
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 v4.3.2
npm ERR! npm  v2.14.12
npm ERR! path C:\Users\Next-Version\AppData\Roaming\npm-cache\xtend\4.0.1\package\package.json.9c277ab6532ec69d68e9da8f764c6a72
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall rename

npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\Next-Version\AppData\Roaming\npm-cache\xtend\4.0.1\package\package.json.9c277ab6532ec69d68e9da8f764c6a72' -> 'C:\Users\Next-Version\AppData\Roaming\npm-cache\xtend\4.0.1\package\package.json'
npm ERR!     at Error (native)
npm ERR!  { [Error: EPERM: operation not permitted, rename 'C:\Users\Next-Version\AppData\Roaming\npm-cache\xtend\4.0.1\package\package.json.9c277ab6532ec69d68e9da8f764c6a72' -> 'C:\Users\Next-Version\AppData\Roaming\npm-cache\xtend\4.0.1\package\package.json']
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'rename',
npm ERR!   path: 'C:\\Users\\Next-Version\\AppData\\Roaming\\npm-cache\\xtend\\4.0.1\\package\\package.json.9c277ab6532ec69d68e9da8f764c6a72',
npm ERR!   dest: 'C:\\Users\\Next-Version\\AppData\\Roaming\\npm-cache\\xtend\\4.0.1\\package\\package.json',
npm ERR!   parent: 'through2' }
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:\devcenter\rrpp\npm-debug.log
 (CLI v2.0.0-beta.19)

Your system information:

Cordova CLI: 6.0.0
Ionic Version: 2.0.0-beta.3
Ionic CLI Version: 2.0.0-beta.19
Ionic App Lib Version: 2.0.0-beta.9
OS:
Node Version: v4.3.2

What can i do? I tried reinstalling npm, node, ionic and cordova without solution.

Thanks!

2 Likes

had the same problem fixed with node update and ionic reinstall

1 Like

Mmm, nothing here. i tried recently, uninstalling node and its dependencies, reinstalling node and installing ionic/cordova but same result :S

I think is something about the long path things in windows, or not? fuck, i want to develop in v2 :frowning:

1 Like

@aluknot Sorry you’re having troubles!

So jsut to run down the list of things, did you

  • Install ionic and cordova globally from an admin command prompt?
  • Update/downgrade node versions recently?
1 Like

Now the problem is solved :). Yesterday i uninstalled node, now when i go to the official page i see new versions available (v4.4.0 LTS and v5.8.0 Stable). Before i used v4.3.1 and v4.3.2 with the problems descripted above, now i decide to use v5 and works perfect.

But maybe the solution was the manually deletion of the folder npm-cache in C:\Users\{user-name}\AppData\Roaming\npm-cache

This last time i tried with Windows PowerShell (i don’t think this is relevant but who knows)

Sry if my english isn’t perfect. And thanks for the answers!

P.S: i have 2.0.0-beta.19 version of ionic, but i see there is a 2.0.0-beta.2, this is the last? becouse npm install -g ionic@beta download the .19 version.

1 Like

So ionic on npm is the cli package name

the framework is under ionic-angular on npm.

1 Like

Same problem here!

Installing the Ionic project from the admin command prompt, solved my issue…

1 Like

Yeah but in my case that didn’t solve the problem, only the update of node. But nvm, this was solved some days ago.

This can be closed.

1 Like