无法创建离子2应用程序

时间:2016-10-29 10:24:11

标签: ionic-framework ionic2

我正在关注离子安装指南,但是当我想创建应用时,它会给我错误。

我输入的命令是:

ionic start cutePuppyPics --v2

它给出的错误是:

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files (x86)\\Nodist\\v\\nodev7.0.0\\node.exe" "C:\\Program Files (x86)\\Nodist\\bin\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v7.0.0
npm ERR! npm  v3.10.6
npm ERR! code ELIFECYCLE

npm ERR! node-sass@3.9.3 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@3.9.3 postinstall script 'node scripts/build.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node scripts/build.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs node-sass
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls node-sass
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     E:\nodeProjects\ionic\cutePuppyPics\npm-debug.log
Error with start undefined
Error Initializing app: There was an error with the spawned command: npminstall
There was an error with the spawned command: npminstall
Caught exception:
 undefined

Mind letting us know? https://github.com/driftyco/ionic-cli/issues

3 个答案:

答案 0 :(得分:0)

节点SKLabel.fontColor.alpha导致此问题。而不是nodejs v7.0.0使用nodejs v7.0.0或从https://nodejs.org/en/download安装LTS版本的节点

答案 1 :(得分:0)

创建项目时不必使用--v2。只需输入

即可
ionic start cutePuppyPics blank

答案 2 :(得分:0)

--v2无法使用最新的离子。你可以用

ionic start cutePuppyPics ionic-angular  (for ionic 2.x)
ionic start cutePuppyPics ionic1 (ionic 1.x)