You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Yohan Lasorsa (JIRA)" <ji...@apache.org> on 2017/09/01 06:54:01 UTC

[jira] [Comment Edited] (CB-9626) Cordova-Lib requires NPM as a dependency

    [ https://issues.apache.org/jira/browse/CB-9626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16150135#comment-16150135 ] 

Yohan Lasorsa edited comment on CB-9626 at 9/1/17 6:53 AM:
-----------------------------------------------------------

[~stevegill] This is not the behavior I'm seeing on Windows 10, see this log and notice the NPM version:


{code:shell}
cordova platform add android@6.2.1

Using cordova-fetch for cordova-android@6.2.1
Error: Failed to fetch platform cordova-android@6.2.1
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
Error: cmd: Command failed with exit code 1 Error output:
npm WARN invalid config loglevel="notice"
npm WARN unmet dependency C:\node\test\node_modules\are-we-there-yet requires readable-stream@'^2.0.6' but will load
npm WARN unmet dependency C:\node\test\node_modules\readable-stream,
npm WARN unmet dependency which is version 1.0.34
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\node\\test\\node_modules\\npm\\bin\\npm-cli.js" "install" "cordova-android@6.2.1" "--save"
npm ERR! node v8.4.0
npm ERR! npm  v2.15.12
npm ERR! code EPEERINVALID
{code}

My install has npm 5 though:
{code:shell}
npm -v
5.3.0
{code}

So fetch is definitely using that outdated NPM version, at least on Windows.


was (Author: sinedied):
[~stevegill] This is not the behavior I'm seeing on Windows 10, see this log and notice the NPM version:
```
cordova platform add android@6.2.1

Using cordova-fetch for cordova-android@6.2.1
Error: Failed to fetch platform cordova-android@6.2.1
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
Error: cmd: Command failed with exit code 1 Error output:
npm WARN invalid config loglevel="notice"
npm WARN unmet dependency C:\node\test\node_modules\are-we-there-yet requires readable-stream@'^2.0.6' but will load
npm WARN unmet dependency C:\node\test\node_modules\readable-stream,
npm WARN unmet dependency which is version 1.0.34
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\node\\test\\node_modules\\npm\\bin\\npm-cli.js" "install" "cordova-android@6.2.1" "--save"
npm ERR! node v8.4.0
npm ERR! npm  v2.15.12
npm ERR! code EPEERINVALID
```

My install has npm 5 though:
```
npm -v
5.3.0
```

So fetch is definitely using that outdated NPM version, at least on Windows.

> Cordova-Lib requires NPM as a dependency
> ----------------------------------------
>
>                 Key: CB-9626
>                 URL: https://issues.apache.org/jira/browse/CB-9626
>             Project: Apache Cordova
>          Issue Type: Wish
>          Components: cordova-lib
>            Reporter: Robert Baker
>              Labels: backlog, tools-next
>
> I'm using NPM 3.x (3.3.2) and cordova-create is installing NPM 2.x in my node modules folder.
> There should be a way around this, I rather not have a copy of NPM (especially an older copy) in my node_modules.
> NPM 3.x is stable, included in node 5.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org