1

I am using windows 10 and I am trying to create an ionic project using the sample template on the github, but I am getting the following error:

D:\Programming Exercise\mobile\ionic2Samples>ionic start MyIonic2Project tutorial --v2 --ts One awesome Ionic app coming right up... Downloading: https://github.com/driftyco/ionic2-app-base/archive/typescript.zip Downloading: https://github.com/driftyco/ionic2-starter-tutorial/archive/typescript.zip Installing Node Modules Unable to run exec commandError: Command failed: C:\WINDOWS\system32\cmd.exe /s /c "npm install" npm WARN MyIonic2Project No description npm WARN MyIonic2Project No repository field. npm WARN MyIonic2Project No license field. 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 v5.6.0 npm ERR! npm v3.6.0 npm ERR! path D:\Programming Exercise\mobile\ionic2Samples\MyIonic2Project\node_modules\json5\lib\cli.js npm ERR! code ENOENT npm ERR! errno -4058 npm ERR! syscall chmod npm ERR! enoent ENOENT: no such file or directory, chmod 'D:\Programming Exercise\mobile\ionic2Samples\MyIonic2Project\node_modules\json5\lib\cli.js' npm ERR! enoent ENOENT: no such file or directory, chmod 'D:\Programming Exercise\mobile\ionic2Samples\MyIonic2Project\node_modules\json5\lib\cli.js' npm ERR! enoent This is most likely not a problem with npm itself npm ERR! enoent and is related to npm not being able to find a file. npm ERR! enoent npm ERR! Please include the following file with any support request: npm ERR! D:\Programming Exercise\mobile\ionic2Samples\MyIonic2Project\npm-debug.log (CLI v2.0.0-beta.17) Your system information: Cordova CLI: 6.0.0 Ionic CLI Version: 2.0.0-beta.17 Ionic App Lib Version: 2.0.0-beta.8 OS: Node Version: v5.6.0***

1

1 Answer 1

2

I had similar problem here: Npm error after update ionic 2 but now is solved.

You can see my answer, but try this:

  1. Uninstall ionic and cordova with: npm uninstall -g ionic cordova
  2. Uninstall nodejs with the windows installer/uninstaller or use something like IObit Uninstaller to perform a clean and complete uninstall.
  3. Manually remove the npm-cache folder located in C:\Users\{YourUserNameHere}\AppData\Roaming\npm-cache (in my case npm cache clean doesn't work)
  4. Restart your PC and now install nodejs, you can see that now there is a new version v5.8.0 and works perfect with ionic (at least for me).
  5. Install ionic and cordova: npm install -g cordova ionic@beta and have fun!

Like i see in your errors, you tried v5.6.0 node version and 2.0.0-beta.17 ionic version, try now with v5.8.0 and 2.0.0-beta.19 which are the last versions at the moment.

P.S: Ofcourse don't forget to open the cmd.exe or whatever command prompt you are using, as Administrator.

P.S2: Sorry if my english isn't perfect, but you will understand me.

2
  • Just updating Nodejs from 4.3.2 to 5.7.1 has fixed the problem for me - I didn't need to do the other steps. Mar 11, 2016 at 18:53
  • Nice, yeah this steps are maybe if the update is not working. Remember that now is in 5.8.0, and at least for me... is working perfect with ionic 2!
    – aluknot
    Mar 12, 2016 at 3:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.