1. 程式人生 > >cordova建立專案失敗問題

cordova建立專案失敗問題

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\
[email protected]
@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\陳海飛\AppData\Roaming\npm-cache\_logs\2018-10-12T14_49_29_635Z-debug.log)

解決:安裝版本

cnpm install -g [email protected]