nim*_*mzz 5 android cordova ionic-framework angular
我在我的离子项目中删除了我的android平台并试图重新安装它,但我一直在接收npm ERR! code ENOLOCAL.输入时出现错误platform add android:
(node:3880) UnhandledPromiseRejectionWarning: CordovaError: Error: cmd: Command failed with exit code 1 Error output:
npm ERR! code ENOLOCAL
npm ERR! Could not install from "android" as it does not contain a package.json file.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\RMT016\AppData\Roaming\npm-cache\_logs\2018-09-26T08_08_46_485Z-debug.log
at C:\Users\RMT016\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-fetch\index.js:105:29
at _rejected (C:\Users\RMT016\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:864:24)
at C:\Users\RMT016\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:890:30
at Promise.when (C:\Users\RMT016\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:1142:31)
at Promise.promise.promiseDispatch (C:\Users\RMT016\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:808:41)
at C:\Users\RMT016\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:624:44
at runSingle (C:\Users\RMT016\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:137:13)
at flush (C:\Users\RMT016\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:125:13)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
(node:3880) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:3880) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate
the Node.js process with a non-zero exit code.
Run Code Online (Sandbox Code Playgroud)
我尝试删除并添加平台,同时删除并添加node_modules但仍然得到相同的错误.我的Cordova版本是8.0.谁知道怎么解决这个问题?
nim*_*mzz 23
在根目录(而不是平台目录)中创建了Android文件夹,删除此文件夹后,该命令再次起作用.
| 归档时间: |
|
| 查看次数: |
2299 次 |
| 最近记录: |