Windows 7 中的离子安装错误 [英] ionic installing error in windows 7

查看:18
本文介绍了Windows 7 中的离子安装错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我按照 here 中的说明在 windows7 上安装 ionic,但我得到了错误.

I followed the instruction from here to install ionic on windows7,but I got the error.

当前安装的其他实用程序版本是:

Current installed other utility versions are :

nodejs version 4.3.1

npm version 2.14.12

cordova version 6.0.0

当我尝试安装 ionic 时,我得到以下结果

When I trying to install ionic I get the following result

C:Userspranav>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:Userspranav
ode_modulesew
ode_modulesgulp-sass
ode_modules
ode-sass
ode_modulescross-spawn
ode_modulesspawn-sync > node postinstall /

node-sass@3.4.2 install C:Userspranav
ode_modulesew
ode_modulesgulp-sass
ode_modules
ode-sass

node scripts/install.js Binary downloaded and installed at C:Userspranav
ode_modulesew
ode_modulesgulp-sass
ode_modules
ode-sassvendorwin32-ia32-46inding.node > node-sass@3.4.2 postinstall C:Userspranav
ode_modulesew
ode_modulesgulp-sass
ode_modules
ode-sass > node scripts/build.js 
C:Userspranav
ode_modulesew
ode_modulesgulp-sass
ode_modules
ode-sassvendorwin32-ia32-46inding.node exists. testing binary. Binary is fine; exiting. ew@1.1.1 C:Userspranav
ode_modulesew 
├── 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)

请帮我解决这个问题.

推荐答案

确保下载并安装 Git for窗户.

要安装 Cordova,请确保您已安装 Node.js,然后运行

To install Cordova, make sure you have Node.js installed, then run

 npm install -g cordova

为 Android 开发的 Windows 用户:您需要确保已安装并设置以下内容.

Windows users developing for Android: You'll want to make sure you have the following installed and set up.

注意:每当您对 PATH 或任何其他环境变量进行更改时,您都需要在 shell 程序中重新启动或打开一个新选项卡以使 PATH 更改生效.

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.

Java JDK

安装最新的 Java JDK(不仅仅是 JRE).

Install the most recent Java JDK (NOT just the JRE).

接下来,为 JAVA_HOME 创建一个环境变量,指向安装 Java JDK 的根文件夹.因此,如果您将 JDK 安装到 C:Program FilesJavajdk7,请将 JAVA_HOME 设置为该路径.之后,将 JDK 的 bin 目录也添加到 PATH 变量中.按照前面的假设,这应该是 %JAVA_HOME%in 或完整路径 C:Program FilesJavajdk7in

Next, create an environment variable for JAVA_HOME pointing to the root folder where the Java JDK was installed. So, if you installed the JDK into C:Program FilesJavajdk7, set JAVA_HOME to be this path. After that, add the JDK's bin directory to the PATH variable as well. Following the previous assumption, this should be either %JAVA_HOME%in or the full path C:Program FilesJavajdk7in

Apache Ant

要安装 Ant,请从此处下载 zip 文件,将其解压缩,将 zip 文件中的第一个文件夹移至安全位置,然后更新 PATH 以在该文件夹中包含 bin 文件夹.例如,如果您将 Ant 文件夹移动到 c:/,您需要将其添加到您的 PATH:C:apache-ant-1.9.2in.

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. For example, if you moved the Ant folder to c:/, you'd want to add this to your PATH: C:apache-ant-1.9.2in.

Android SDK

还需要安装 Android SDK.Android SDK 为您提供构建、测试和调试 Android 应用所需的 API 库和开发者工具.

Installing the Android SDK is also necessary. The Android SDK provides you the API libraries and developer tools necessary to build, test, and debug apps for Android.

Cordova 需要设置 ANDROID_HOME 环境变量.这应该指向 [ANDROID_SDK_DIR]android-sdk 目录(例如 c:androidandroid-sdk).

Cordova requires the ANDROID_HOME environment variable to be set. This should point to the [ANDROID_SDK_DIR]android-sdk directory (for example c:androidandroid-sdk).

接下来,更新您的 PATH 以在该文件夹中包含 tools/和 platform-tools/文件夹.因此,使用 ANDROID_HOME,您将同时添加 %ANDROID_HOME% ools 和 %ANDROID_HOME%platform-tools.

Next, update your PATH to include the tools/ and platform-tools/ folder in that folder. So, using ANDROID_HOME, you would add both %ANDROID_HOME% ools and %ANDROID_HOME%platform-tools.

安装离子

npm install -g ionic

希望对你有帮助!

这篇关于Windows 7 中的离子安装错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆