离子2.3.0无法通过npm安装插件

时间:2017-09-05 09:47:54

标签: ionic2

我尝试安装插件" cordova-plugin-network-information" (作为管理员)通过

  

npm install --save @ ionic-native / network

流程停在:

  

/ postinstall:info lifecycle @ 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

请帮忙。

1 个答案:

答案 0 :(得分:0)

CrossPost,对不起;-)但是得到一个解决方案:

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