ionic cordova plugin 错误

ionic升级到3之后安装插件经常报错:eg. ionic  cordova plugin xxx

错误日志如下:

971 verbose node v8.2.1
972 verbose npm  v5.3.0
973 error path C:\Users\xxx\node_modules\phonegap-plugin-barcodescanner
974 error code ENOENT
975 error errno -4058
976 error syscall rename
977 error enoent ENOENT: no such file or directory, rename 'C:\Users\xxx\node_modules\phonegap-plugin-barcodescanner' -> 'C:\Users\xxx\node_modules\.phonegap-plugin-barcodescanner.DELETE'
978 error enoent This is related to npm not being able to find a file.
979 verbose exit [ -4058, true ]

解决方式:

以管理员模式运行cmd,即取得管理员的终端权限,再次执行命令,安装成功!

ps:不知是否我环境问题,小计一下

你可能感兴趣的:(ionic,cordova)