我正在尝试使用Ionic在Windows 10中创建一个新项目,并完全安装所有依赖项和模块。
当我使用以下方式创建应用时:
ionic start my-app
它抛出以下错误:
> npm install
✖ Running command - failed!
[ERROR] An error occurred while running npm install (exit code 1):
npm WARN deprecated object-keys@0.2.0: Please update to the latest object-keys
npm ERR! code 1
npm ERR! Command failed: C:\Program Files\Git\cmd\git.EXE submodule update -q --init --recursive
npm ERR! C:\Program Files\Git\mingw64/libexec/git-core\git-submodule: line 7: basename: command not found
npm ERR! C:\Program Files\Git\mingw64/libexec/git-core\git-submodule: line 7: sed: command not found
npm ERR! C:\Program Files\Git\mingw64/libexec/git-core\git-submodule: line 19: .: git-sh-setup: file not found
npm ERR!
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Despair\AppData\Roaming\npm-cache\_logs\2017-06-27T13_56_55_297Z-debug.log
我无法弄清楚发生了什么。有什么建议吗?
更新
Here is the commands i ran for info and results I got:
>ionic info
global packages:
@ionic/cli-utils : 1.4.0
Ionic CLI : 3.4.0
local packages:
@ionic/app-scripts : not installed
@ionic/cli-plugin-ionic-angular : 1.3.1
Ionic Framework : not installed
System:
Node : v8.1.2
OS : Windows 10
Xcode : not installed
ios-deploy : not installed
ios-sim : not installed
npm : 5.0.3
npm -v:
5.0.3
答案 0 :(得分:3)
运行此命令
npm install @ionic/app-scripts@latest --save-dev