cordova创建项目失败问题

时间秒杀一切 提交于 2019-11-30 10:45:17

先安装cordova环境:https://my.oschina.net/u/4193800/blog/3110305

cmd执行:

cordova create hello com.demo.hello hello

 

 报错信息:

Creating a new cordova project.
Unhandled "error" event. (  Error from Cordova Fetch: Error: cmd: Command failed with exit code 1 Error output:
npm ERR! code ENOLOCAL
npm ERR! Could not install from "..\AppData\Roaming\npm\node_modules\cordova\node_modules\_cordova-app-hello-world@3.12.0@cordova-app-hello-world\index.js" 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\DELL\AppData\Roaming\npm-cache\_logs\2018-10-12T14_49_29_635Z-debug.log)

 

 解决:安装版本

cnpm install -g cordova@6.0.0

 

创建项目:https://blog.csdn.net/qiyei2009/article/details/80552189

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!