npm命令运行时报错,错误运行npm i时出错(退出代码1):离子错误

I started working on ionic, i am totally new to this, and following This tutorials , i know this type of question already asked but not have proper solution to it, please provide solution to it, step i followed as,

1.Node installed - node-v8.9.0-x86

2. ran command npm install -g cordova ionic

npm WARN deprecated node-uuid@1.4.8: 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: fsevents@1.1.2

(node_modules\ionic\node_modules\fsevents):

npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for

fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current:

{"os":"win32","arch":"ia32"})

+ cordova@7.1.0

+ ionic@3.16.0

added 115 packages and updated 2 packages in 69.815s

Then ran command ionic start myApp tabs , got following Error

1a1576e3269bf0f2114552922bfcbb2f.png

Thank you,

解决方案

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

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.

Run Command Line as Administrative, this solution is beneficial

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值