简体   繁体   English

Windows 7中的离子安装错误

[英]ionic installing error in windows 7

I followed the instruction from here to install ionic on windows7,but I got the error. 我按照这里的说明在windows7上安装ionic,但是我收到了错误。

Current installed other utility versions are : 当前安装的其他实用程序版本是

nodejs version 4.3.1

npm version 2.14.12

cordova version 6.0.0

When I trying to install ionic I get the following result 当我尝试安装离子时,我得到以下结果

C:\Users\pranav>npm install -g ionic

npm WARN deprecated gulp-minify-css@0.3.13: Please use gulp-cssnano instead.

npm WARN deprecated graceful-fs@3.0.8: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.

npm WARN deprecated npmconf@2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm

npm WARN deprecated lodash@1.0.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
npm WARN deprecated graceful-fs@1.2.3: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible. > spawn-sync@1.0.15 postinstall C:\Users\pranav\node_modules\ew\node_modules\gulp-sass\node_modules\node-sass\node_modules\cross-spawn\node_modules\spawn-sync > node postinstall /

node-sass@3.4.2 install C:\Users\pranav\node_modules\ew\node_modules\gulp-sass\node_modules\node-sass

node scripts/install.js Binary downloaded and installed at C:\Users\pranav\node_modules\ew\node_modules\gulp-sass\node_modules\node-sass\vendor\win32-ia32-46\binding.node > node-sass@3.4.2 postinstall C:\Users\pranav\node_modules\ew\node_modules\gulp-sass\node_modules\node-sass > node scripts/build.js 
C:\Users\pranav\node_modules\ew\node_modules\gulp-sass\node_modules\node-sass\vendor\win32-ia32-46\binding.node exists. testing binary. Binary is fine; exiting. ew@1.1.1 C:\Users\pranav\node_modules\ew 
├── gulp-rename@1.2.2 
├── gulp-concat@2.6.0 (concat-with-sourcemaps@1.0.4, through2@0.6.5, gulp-util@3.0.7) 
├── gulp-minify-css@0.3.13 (memory-cache@0.0.5, vinyl-sourcemaps-apply@0.1.4, bufferstreams@0.0.2, through2@0.6.5, clean-css@3.0.10, gulp-util@3.0.7) 
├── gulp@3.9.1 (interpret@1.0.0, pretty-hrtime@1.0.2, deprecated@0.0.1, archy@1.0.0, minimist@1.2.0, semver@4.3.6, tildify@1.1.2, v8flags@2.0.11, chalk@1.1.1, orchestrator@0.3.7, liftoff@2.2.0, vinyl-fs@0.3.14, gulp-util@3.0.7) 
└── gulp-sass@2.2.0 (object-assign@4.0.1, vinyl-sourcemaps-apply@0.2.1, through2@2.0.1, gulp-util@3.0.7, node-sass@3.4.2)

Please help me to resolve this issue. 请帮我解决这个问题。

Make sure to download and install Git for Windows . 确保下载并安装Git for Windows

To install Cordova, make sure you have Node.js installed, then run 要安装Cordova,请确保已安装Node.js ,然后运行

 npm install -g cordova

Windows users developing for Android: You'll want to make sure you have the following installed and set up. 为Android开发的Windows用户:您需要确保安装并设置了以下内容。

NOTE: Whenever you make changes to the PATH, or any other environment variable, you'll need to restart or open a new tab in your shell program for the PATH change to take effect. 注意:每当您对PATH或任何其他环境变量进行更改时,您都需要重新启动或打开shell程序中的新选项卡,以使PATH更改生效。

Java JDK Java JDK

Install the most recent Java JDK (NOT just the JRE). 安装最新的Java JDK(不仅仅是JRE)。

Next, create an environment variable for JAVA_HOME pointing to the root folder where the Java JDK was installed. 接下来,为JAVA_HOME创建一个环境变量,指向安装Java JDK的根文件夹。 So, if you installed the JDK into C:\\Program Files\\Java\\jdk7, set JAVA_HOME to be this path. 因此,如果将JDK安装到C:\\ Program Files \\ Java \\ jdk7中,请将JAVA_HOME设置为此路径。 After that, add the JDK's bin directory to the PATH variable as well. 之后,将JDK的bin目录添加到PATH变量中。 Following the previous assumption, this should be either %JAVA_HOME%\\bin or the full path C:\\Program Files\\Java\\jdk7\\bin 按照前面的假设,这应该是%JAVA_HOME%\\ bin或完整路径C:\\ Program Files \\ Java \\ jdk7 \\ bin

Apache Ant Apache Ant

To install Ant, download a zip from here, extract it, move the first folder in the zip to a safe place, and update your PATH to include the bin folder in that folder. 要安装Ant,请从此处下载zip文件,将其解压缩,将zip中的第一个文件夹移动到安全位置,然后更新PATH以将bin文件夹包含在该文件夹中。 For example, if you moved the Ant folder to c:/, you'd want to add this to your PATH: C:\\apache-ant-1.9.2\\bin. 例如,如果将Ant文件夹移动到c:/,则需要将其添加到PATH:C:\\ apache-ant-1.9.2 \\ bin。

Android SDK Android SDK

Installing the Android SDK is also necessary. 安装Android SDK也是必要的。 The Android SDK provides you the API libraries and developer tools necessary to build, test, and debug apps for Android. Android SDK为您提供构建,测试和调试Android应用程序所需的API库和开发人员工具。

Cordova requires the ANDROID_HOME environment variable to be set. Cordova需要设置ANDROID_HOME环境变量。 This should point to the [ANDROID_SDK_DIR]\\android-sdk directory (for example c:\\android\\android-sdk). 这应该指向[ANDROID_SDK_DIR] \\ android-sdk目录(例如c:\\ android \\ android-sdk)。

Next, update your PATH to include the tools/ and platform-tools/ folder in that folder. 接下来,更新PATH以包含该文件夹中的tools /和platform-tools /文件夹。 So, using ANDROID_HOME, you would add both %ANDROID_HOME%\\tools and %ANDROID_HOME%\\platform-tools. 因此,使用ANDROID_HOME,您将添加%ANDROID_HOME%\\ tools和%ANDROID_HOME%\\ platform-tools。

Install Ionic 安装离子

npm install -g ionic

Hope this will help you ! 希望这个能对您有所帮助 !

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM