【发布时间】:2018-05-10 03:11:45
【问题描述】:
我正在尝试在 ionic 中添加 android 平台,但它不起作用,它显示以下错误:
C:\Users\Lenovo\Desktop\first app\RoomBooking>cordova platform add android
Using cordova-fetch for cordova-android@~6.3.0
Error: Failed to fetch platform cordova-android@~6.3.0
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
Error: cmd: Command failed with exit code 4294963248 Error output:
npm ERR! path C:\Users\Lenovo\Desktop\first app\RoomBooking\node_modules\.stagin
g
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall unlink
npm ERR! Error: EPERM: operation not permitted, unlink 'C:\Users\Lenovo\Desktop\
first app\RoomBooking\node_modules\.staging'
npm ERR! { Error: EPERM: operation not permitted, unlink 'C:\Users\Lenovo\Deskt
op\first app\RoomBooking\node_modules\.staging'
npm ERR! stack: 'Error: EPERM: operation not permitted, unlink \'C:\\Users\\Le
novo\\Desktop\\first app\\RoomBooking\\node_modules\\.staging\'',
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'unlink',
npm ERR! path: 'C:\\Users\\Lenovo\\Desktop\\first app\\RoomBooking\\node_modul
es\\.staging' }
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\Lenovo\AppData\Roaming\npm-cache\_logs\2017-11-26T21_56_46
_792Z-debug.log
我该怎么办?
【问题讨论】:
-
这可能是连接问题,或者平台规范不正确。检查您的连接和平台名称/版本/URL
标签: android angular ionic-framework ionic2 ionic3