先安装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