Error Starting a new Ionic project in Node js 6.11.2

I am a new ionic developer, with some experience with ionic 2. So anyways, Today August,13th,2017, I tried to start a new Ionic two project, but to no avail. Looking at some old posts on stack overflow, I decided to update my node.js command prompt to 6.11.2.

Now even after installing the latest stable version of node.js (to my knowledge), I am still unable to get a new ionic 2 project working. This comes after using the --type=ionic-angular addon. Can someone tell me why I keep getting the following errors while starting the project.

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.11.2
npm ERR! npm  v3.10.10
npm ERR! path C:\Users\Jay\AppData\Roaming\npm-cache\zone.js\0.8.12\package
npm ERR! code UNKNOWN
npm ERR! errno -4094
npm ERR! syscall mkdir

npm ERR! UNKNOWN: unknown error, mkdir 'C:\Users\Jay\AppData\Roaming\npm-cache\zone.js\0.8.12\package'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\Jay\FinalProj\npm-debug.log

the code for the npm-debug is shown below.

676 verbose stack Error: UNKNOWN: unknown error, mkdir 'C:\Users\Jay\AppData\Roaming\npm-cache\zone.js\0.8.12\package'
676 verbose stack     at Error (native)
677 verbose cwd C:\Users\Jay\FinalProj
678 error Windows_NT 10.0.14393
679 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
680 error node v6.11.2
681 error npm  v3.10.10
682 error path C:\Users\Jay\AppData\Roaming\npm-cache\zone.js\0.8.12\package
683 error code UNKNOWN
684 error errno -4094
685 error syscall mkdir
686 error UNKNOWN: unknown error, mkdir 'C:\Users\Jay\AppData\Roaming\npm-cache\zone.js\0.8.12\package'
687 error If you need help, you may report this error at:
687 error     <https://github.com/npm/npm/issues>
688 verbose exit [ -4094, true ]

You probably updated NodeJS incorrectly. My advice.

  1. Manually delete your NodeJS update. Drag and drop it into the recycle bin.
  2. Install nvm or nvm for Windows.
  3. Use nvm to install the current Node LTS.
  4. Once that is stable, install Ionic.
  5. DO NOT run any command as Administrator. Otherwise, uninstalling later might cause you problems.
2 Likes