在安装Cordova (PhoneGap)过程中,我得到的警告类似于“npm WARN engine Cordova-js@3”。8.0:想要……”

时间:2022-06-01 20:26:14

I want to develop PhoneGap application, So I am trying to install cordova on the window using the procedure mention in this link.

我想开发PhoneGap应用程序,所以我尝试在窗口上安装cordova,使用这个链接中的过程。

1. Node.js
2. git client
3. npm install npm -g
I use above step-3,(Please see) to get rid from this warning, did not succeed
4 npm install -g cordova

1。节点。js 2。git客户3。npm安装npm -g我使用以上步骤3,(请见)摆脱这个警告,没有成功安装npm -g cordova

But I am getting the follwing warning.

但我得到以下警告。

C:\>npm install -g cordova
npm WARN engine cordova-js@3.8.0: wanted: {"node":"~0.10.x"} (current: {"node":"
0.12.0","npm":"2.5.1"})
npm WARN engine npm@1.3.4: wanted: {"node":">=0.6","npm":"1"} (current: {"node":
"0.12.0","npm":"2.5.1"})
npm WARN engine xmlbuilder@2.2.1: wanted: {"node":"0.8.x || 0.10.x"} (current: {
"node":"0.12.0","npm":"2.5.1"})
C:\Users\Neelabh\AppData\Roaming\npm\cordova -> C:\Users\Neelabh\AppData\Roaming
\npm\node_modules\cordova\bin\cordova
cordova@4.3.0 C:\Users\Neelabh\AppData\Roaming\npm\node_modules\cordova
├── underscore@1.7.0
├── q@1.0.1
├── nopt@3.0.1 (abbrev@1.0.5)
└── cordova-lib@4.3.0 (valid-identifier@0.0.1, osenv@0.1.0, properties-parser@0.
2.3, bplist-parser@0.0.6, mime@1.2.11, unorm@1.3.3, semver@2.0.11, shelljs@0.3.0
, dep-graph@1.1.0, rc@0.5.2, elementtree@0.1.5, xcode@0.6.7, d8@0.4.4, glob@4.0.
6, npmconf@0.1.16, through2@0.6.3, init-package-json@1.3.0, request@2.47.0, tar@
1.0.2, plist@1.1.0, cordova-js@3.8.0, npm@1.3.4)

3 个解决方案

#1


11  

don't worry about the warning,

不要担心警告,

nodejs 0.12 were just release last mounth, Cordova team havn't yet update dependencies.

nodejs 0.12刚刚发布,科尔多瓦队还没有更新依赖项。

Another thing the most up to date Cordova build is 4.1.2, try :

Cordova最新的统计数据是4.1.2,试试:

npm install -g cordova@4

to force npm installing the newer version. Cordova 4 works with both 0.10 and 0.12 nodejs version but will warn you as the 3.8 version. Things should return at normal soon after teams updates all the dependencies.

强制npm安装新版本。Cordova 4使用的是0.10和0.12个nodejs版本,但会以3.8版本警告你。在团队更新所有依赖项之后,事情应该恢复正常。

If you really want to care about that warning you could downgrade your nodejs installation to 0.10 and everything will return as usual.

如果您真的想要关注这个警告,您可以将nodejs安装降低到0.10,然后一切都会恢复正常。

Hope that help.

希望有帮助。

#2


0  

Installing below 0.12 versions of Node.js solves this issue.

安装以下0.12版本的节点。js解决了这个问题。

#3


0  

I just went to NODEjs site and it updated after download.

我刚去NODEjs网站,下载后更新。

#1


11  

don't worry about the warning,

不要担心警告,

nodejs 0.12 were just release last mounth, Cordova team havn't yet update dependencies.

nodejs 0.12刚刚发布,科尔多瓦队还没有更新依赖项。

Another thing the most up to date Cordova build is 4.1.2, try :

Cordova最新的统计数据是4.1.2,试试:

npm install -g cordova@4

to force npm installing the newer version. Cordova 4 works with both 0.10 and 0.12 nodejs version but will warn you as the 3.8 version. Things should return at normal soon after teams updates all the dependencies.

强制npm安装新版本。Cordova 4使用的是0.10和0.12个nodejs版本,但会以3.8版本警告你。在团队更新所有依赖项之后,事情应该恢复正常。

If you really want to care about that warning you could downgrade your nodejs installation to 0.10 and everything will return as usual.

如果您真的想要关注这个警告,您可以将nodejs安装降低到0.10,然后一切都会恢复正常。

Hope that help.

希望有帮助。

#2


0  

Installing below 0.12 versions of Node.js solves this issue.

安装以下0.12版本的节点。js解决了这个问题。

#3


0  

I just went to NODEjs site and it updated after download.

我刚去NODEjs网站,下载后更新。