Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ERROR An error occurred while running npm i (exit code 1): Ionic Error

I followed this tutorial:

1.Node installed - node-v8.9.0-x86
2. ran command npm install -g cordova ionic

npm WARN deprecated [email protected]: Use uuid module instead
C:\Users\Android1\AppData\Roaming\npm\cordova -> 
C:\Users\Android1\AppData\Roaming\npm\node_modules\cordova\bin\cordova
C:\Users\Android1\AppData\Roaming\npm\ionic -> 
C:\Users\Android1\AppData\Roaming\npm\node_modules\ionic\bin\ionic
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] 
(node_modules\ionic\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for 
[email protected]: wanted {"os":"darwin","arch":"any"} (current: 
{"os":"win32","arch":"ia32"})

+ [email protected]
+ [email protected]
added 115 packages and updated 2 packages in 69.815s
  1. Then ran command ionic start myApp tabs , got following Error

enter image description here

Thank you,

like image 874
Onkar Avatar asked Nov 02 '17 06:11

Onkar


1 Answers

After spending more than day i came across many solutions, which are as follow

  1. Some developers solve this problem by, i downgraded node from v8 to v7.6.0 and all seems to work fine with ionic CLI. From Here but this solution not work for me.

  2. Run Command Line as Administrative, this solution is beneficial

  3. The Correct and well solution work for me, is to install install all node-gyp dependencies by following command

     $ npm install --global --production windows-build-tools
    

    and then install the package

     $ npm install --global node-gyp
    

Solution Link

like image 71
Onkar Avatar answered Oct 16 '22 14:10

Onkar