【问题标题】:ionic 2.3.0 cant install plugin via npmionic 2.3.0 无法通过 npm 安装插件
【发布时间】:2018-02-13 13:40:25
【问题描述】:

我尝试通过

安装插件“cordova-plugin-network-information”(以管理员身份)

npm install --save @ionic-native/network

过程停止于:

/ postinstall:信息生命周期@ionic-native/network@4.2.1~postinstall:@ionic-native/network@4.2.1

我收到以下错误:

npm ERR! path C:\path\node_modules\fsevents\node_modules\ansi-regex\package.json
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall unlink
npm ERR! Error: EPERM: operation not permitted, unlink 'C:\path\node_modules\fsevents\node_modules\ansi-regex\package.json'
npm ERR!     at Error (native)
npm ERR!  { Error: EPERM: operation not permitted, unlink 'C:\path\node_modules\fsevents\node_modules\ansi-regex\package.json'
npm ERR!     at Error (native)
npm ERR!   stack: 'Error: EPERM: operation not permitted, unlink \'C:\\path\\node_modules\\fsevents\\node_modules\\ansi-regex\\package.json\'\n    
at Error (native)',
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'unlink',
npm ERR!   path: 'C:\\path\\node_modules\\fsevents\\node_modules\\ansi-
regex\\package.json' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\username\AppData\Roaming\npm-cache\_logs\2017-09-05T09_43_58_528Z-debug.log

信息:

cli 包:(C:\Users\username.npm-packages\node_modules)

@ionic/cli-utils  : 1.9.2
ionic (Ionic CLI) : 3.9.2

全局包:

Cordova CLI : 7.0.1

本地包:

@ionic/app-scripts : 1.1.4
Cordova Platforms  : android 6.2.1
Ionic Framework    : ionic-angular 2.3.0

系统:

Node : v6.9.4
npm  : 5.4.0
OS   : Windows 10

请帮忙。

【问题讨论】:

  • 如果我尝试“npm i”,同样的问题:-(

标签: ionic2


【解决方案1】:

CrossPost,抱歉 ;-) 但得到一个解决方案:

https://forum.ionicframework.com/t/cant-install-plugin/104286/2

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-02-10
    • 2016-06-14
    • 2017-12-10
    • 2011-09-01
    • 2013-10-09
    • 1970-01-01
    • 1970-01-01
    • 2022-11-12
    相关资源
    最近更新 更多