离子和cordova不安装在窗户上 [英] ionic and cordova not installing on windows
问题描述
我正在尝试安装离子,但我没有做到这一点..我安装了 node.js ,但现在我的笔记本电脑上没有安装这两件事。请帮助我,因为我不知道在这种情况下该怎么做。
以下命令我试图使用:
i'm trying to install ionic but i'm failed to do that..i had install node.js but now these 2 things are not installing on my laptop. kindly help me as i don't know what to do in such condition. Following command i tried to use:
npm install -g cordova ionic
sudo npm install -g cordova ionic
npm install -g cordova
npm install -g ionic
< a href =https://i.stack.imgur.com/27eE6.png =nofollow noreferrer>
推荐答案
开始开发一个离子项目:
To start developing an ionic project:
Prereqs
包括 Git for Windows ,这是我假设你根据问题中的图像使用的。安装Git(以及你声明安装的npm)之后,转到你要创建项目的目录并运行以下命令。
Include Git for Windows for windows which is what I assume you are using based on the image in your question. After you install Git (and npm which you also stated was installed) go to the directory where you want to create the project and run the following.
-
npm install -g cordova
-
npm install -g ionic
-
ionic start appName blank
-
cd appName
-
ionic platform add android
-
离子构建android
-
离子模拟android
npm install -g cordova
npm install -g ionic
ionic start appName blank
cd appName
ionic platform add android
ionic build android
ionic emulate android
此外,您可以使用离子服务
在网络浏览器中运行,或者使用离子服务器在iOS和Android上使用网络浏览器 - 实验室
Also you can run in web browser using ionic serve
or a web browser with iOS and Android using ionic serve --lab
如果要模拟Android设备,请确保已安装所需设备的system_image。指导此处以执行此操作。
If you want to emulate the Android device, make sure you have a system_image installed of the device you want. Guide here to do that.
编辑:
运行 npm --v
,你应该看到你正在运行的版本,如果没有,那么npm没有正确安装。全局安装并再次运行该过程。
Run npm --v
and you should see the version you are running, if not then npm isn't installed correctly. Install it globally and run the process again.
这篇关于离子和cordova不安装在窗户上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!