2016-02-23 20 views
3

我遵循here的指令在Windows7上安裝離子,但我得到了錯誤。在Windows 7中的離子安裝錯誤

當前安裝的其他工具的版本:

nodejs version 4.3.1 

npm version 2.14.12 

cordova version 6.0.0 

當我嘗試安裝離子我得到以下結果

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

npm WARN deprecated [email protected]: Please use gulp-cssnano instead. 

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

npm WARN deprecated [email protected]: this package has been reintegrated into npm and is now out of date with respect to npm 

npm WARN deprecated [email protected]: [email protected]<3.0.0 is no longer maintained. Upgrade to [email protected]^4.0.0. 
npm WARN deprecated [email protected]: graceful-fs version 3 and before will fail on newer node releases. Please update to [email protected]^4.0.0 as soon as possible. > [email protected] 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/

[email protected] 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 > [email protected] 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. [email protected] C:\Users\pranav\node_modules\ew 
├── [email protected] 
├── [email protected] ([email protected], [email protected], [email protected]) 
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) 
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) 
└── [email protected] ([email protected], [email protected], through[email protected], [email protected], [email protected]) 

請幫我解決這個問題。

+0

可以安裝科爾多瓦全球 –

+0

NPM安裝-g科爾多瓦 –

+0

亞我可以安裝它那裏,您可以安裝git的 – Pranavadurai

回答

2

請務必下載並安裝Git for Windows

要安裝科爾多瓦,請確保您已經安裝了Node.js,然後運行

npm install -g cordova 

Windows用戶開發Android:你要確保你有以下安裝和設置。

注意:每當您對PATH或任何其他環境變量進行更改時,您都需要在shell程序中重新啓動或打開一個新選項卡,以使PATH更改生效。

的Java JDK

安裝最新的Java JDK(不僅僅是JRE)。

接下來,爲指向安裝Java JDK的根文件夾的JAVA_HOME創建一個環境變量。因此,如果您將JDK安裝到C:\ Program Files \ Java \ jdk7中,請將JAVA_HOME設置爲此路徑。之後,將JDK的bin目錄也添加到PATH變量中。按照前面的假設,這應該是%JAVA_HOME%\ bin中或完整路徑C:\ Program Files文件\的Java \ JDK7 \ BIN

Apache Ant的

要安裝Ant,從這裏下載一個zip ,解壓縮它,將zip中的第一個文件夾移到安全的地方,然後更新PATH以在該文件夾中包含bin文件夾。例如,如果您將Ant文件夾移動到c:/,您希望將其添加到PATH:C:\ apache-ant-1.9.2 \ bin。

Android SDK中

安裝了Android SDK也是必要的。 Android SDK爲您提供構建,測試和調試Android應用所需的API庫和開發人員工具。

Cordova需要設置ANDROID_HOME環境變量。這應該指向[ANDROID_SDK_DIR] \ android-sdk目錄(例如c:\ android \ android-sdk)。

接下來,更新您的PATH以包含該文件夾中的tools /和platform-tools /文件夾。因此,使用ANDROID_HOME,您可以添加%ANDROID_HOME%\ tools和%ANDROID_HOME%\ platform-tools。

安裝離子

npm install -g ionic 

希望這將幫助你!