本文介绍了命令行中的ionic 2项目创建问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过命令行创建ionic 2项目,但无法创建该项目.我已经安装了 nodeJS v6.9.2 npm版本2.15.11 cordova 6.4.0 ,但出现以下错误

I am trying to create an ionic 2 project through command line but not able to create the project.i have installed nodeJS v6.9.2, npm version 2.15.11 and cordova 6.4.0 but getting the following error

E:\ionic_test>ionic start MyIonic2Project tutorial --v2

根据教程模板在E:\ionic_test\MyIonic2Project中创建Ionic 2.x应用.

Creating an Ionic 2.x app in E:\ionic_test\MyIonic2Project based on the tutorial template.

Downloading: https://github.com/driftyco/ionic2-app-base/archive/master.zip
Error with start Error: read ECONNRESET
    at exports._errnoException (util.js:1022:11)
    at TLSWrap.onread (net.js:569:26)
Error Initializing app: Error: read ECONNRESET
 Error: read ECONNRESET
    at exports._errnoException (util.js:1022:11)
    at TLSWrap.onread (net.js:569:26)

我在Windows 10 64位操作系统上没有管理员权限,但是如果我尝试下载浏览器中的https://github.com/driftyco/ionic2-app-base/archive/master.zip 文件我能够获取文件.

I am on windows 10 64bit dont have the admin rights but if i try to download the https://github.com/driftyco/ionic2-app-base/archive/master.zip file from browseri am able to get the file.

推荐答案

好吧,您的文件夹 ionic_test 中未安装Ionic Utility.
在创建任何应用之前,必须使用以下命令创建离子种子项目:

Ok Brother, Ionic Utility is not installed in your folder ionic_test.
Before creating any app, it's compulsory to create the ionic seed project using this command:

E:\ionic_test>npm install -g ionic

或者,如果您还使用Cordova插件,则最好使用以下方法安全播放:

Or if you are using cordova plugins as well, better play safe with:

E:\ionic_test>npm install -g ionic cordova

然后创建所需的任何应用程序.就是这样:

And then create any app you want. Be it:

E:\ionic_test>ionic start MyIonic2Project tutorial --v2

希望这能解决您的问题.

Hopefully, this would solve your problem.

这篇关于命令行中的ionic 2项目创建问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-19 12:16