更新节点& NPM VS Cordova更新5。

时间:2021-06-21 13:45:51

I just download the VS Apache Cordova Tools Update 5 and I'm running into problems with Node and NPM. I am using the default blank cordova project for testing.

我刚刚下载了VS Apache Cordova工具更新5,我遇到了Node和NPM的问题。我正在使用默认的空白cordova项目进行测试。

Versions

版本

If I run a gulp check for Node and NPM within my VS Project I get: Node version = v0.10.31 and NPM version = 1.4.9. However, I also have installed Node version = v5.4.1 and NPM version = 3.3.6

如果我在我的VS项目中对Node和NPM运行一个gulp检查,我得到:Node version = v0.10.31和NPM版本= 1.4.9。但是,我也安装了Node version = v5.4.1和NPM版本= 3.3.6。

Problem

问题

When I publish using Cordova CLI 5.3.3 I get the following error 更新节点& NPM VS Cordova更新5。 When I change the Cordova CLI to 5.4.1 I get the following error: 更新节点& NPM VS Cordova更新5。

当我使用Cordova CLI 5.3.3发布时,当我将Cordova CLI更改为5.4.1时,我得到以下错误:

If I change the Tools > Options > Projects and Solutions > External Web Tools and add the path C:\Program Files (x86)\nodejs I get the following warning and an npm install failed error.

如果我改变工具>选项> >外部Web工具和添加项目和解决方案的路径C:\Program Files (x86)\nodejs我得到以下警告和一个npm安装失败的错误。

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

Other

其他

If I select use global installed version I get 5.2.0. 更新节点& NPM VS Cordova更新5。

如果我选择使用全局安装的版本,我得到5.2.0。

Any help is greatly appreciated!

非常感谢您的帮助!

Download location and update info for VS Cordova Tools 5 http://microsoft.github.io/vstacoblog/2016/01/13/annoucing-update-5.html

下载位置和更新的信息,为VS Cordova工具5 http://microsoft.github.e.org/2016/01/13/annoucing-update-5.html。

---------------------------Update 1/15/2015 4:50PMEST--------------------------

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - update 1/15/2015下午4:50分- - - - - - - - - - - - - - - - - - - - - - - - - - -

Here's the build log when publishing blank cordova project with node = 5.4.1 using node-v5.4.1-x86.msi and NPM = 3.5.3 installed using package.json.

在使用node-v5.4.1-x86发布空白cordova项目时,这里是构建日志。msi和NPM = 3.5.3安装使用package.json。

1>------ Build started: Project: BlankCordovaApp4, Configuration: Debug Android ------
1>  Your environment has been set up for using Node.js 5.4.1 (ia32) and npm.
1>  ------ Ensuring correct global installation of package from source package directory: C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 14.0\COMMON7\IDE\EXTENSIONS\APACHECORDOVATOOLS\packages\vs-tac
1>  ------ Name from source package.json: vs-tac
1>  ------ Version from source package.json: 1.0.28
1>  ------ Package already installed globally at correct version.
1>  ------ Installing Cordova tools cordova@5.4.1 for project from npm. This could take a few minutes...
1>  Each package is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. Some packages may include dependencies which are governed by additional licenses. Follow the package source (feed) URL to determine any dependencies.
1>  npm WARN deprecated npmconf@2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm
1>  npm ERR! Windows_NT 6.3.9600
1>  npm ERR! argv "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Users\\DBiele\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "cordova@5.4.1" "--loglevel" "warn"
1>  npm ERR! node v5.4.1
1>  npm ERR! npm  v3.3.6
1>
1>  npm ERR! Cannot read property 'localeCompare' of undefined
1>  npm ERR!
1>MDAVSCLI : npm ERR! If you need help, you may report this error at:
1>  npm ERR!     <https://github.com/npm/npm/issues>
1>
1>  npm ERR! Please include the following file with any support request:
1>  npm ERR!     C:\Users\DBiele\AppData\Roaming\npm\node_modules\vs-tac\node_modules\cordova\5.4.1\npm-debug.log
1>  [Error: ------ npm install failed. Exit code: 1]
1>  C:\Users\DBiele\AppData\Roaming\npm\node_modules\vs-tac\node_modules\q\q.js:126
1>                      throw e;
1>                      ^
1>
1>MDAVSCLI : error : ------ npm install failed. Exit code: 1
1>      at ChildProcess.<anonymous> (C:\Users\DBiele\AppData\Roaming\npm\node_modules\vs-tac\lib\util.js:655:29)
1>      at emitTwo (events.js:87:13)
1>      at ChildProcess.emit (events.js:172:7)
1>      at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)

Here's another build log after removing NPM 3.5.3 , clearing cordova cache and npm cache clean

这是在移除NPM 3.5.3之后的另一个构建日志,清除cordova缓存和NPM缓存干净。

1>------ Build started: Project: BlankCordovaApp4, Configuration: Debug Android ------
1>  Your environment has been set up for using Node.js 5.4.1 (ia32) and npm.
1>  ------ Ensuring correct global installation of package from source package directory: C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 14.0\COMMON7\IDE\EXTENSIONS\APACHECORDOVATOOLS\packages\vs-tac
1>  ------ Name from source package.json: vs-tac
1>  ------ Version from source package.json: 1.0.28
1>  ------ Package not currently installed globally.
1>  ------ Installing globally from source package. This could take a few minutes...
1>  Each package is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. Some packages may include dependencies which are governed by additional licenses. Follow the package source (feed) URL to determine any dependencies.
1>  npm WARN deprecated npmconf@0.1.16: this package has been reintegrated into npm and is now out of date with respect to npm
1>  npm WARN engine npm@1.3.4: wanted: {"node":">=0.6","npm":"1"} (current: {"node":"5.4.1","npm":"3.3.6"})
1>  C:\Users\DBiele\AppData\Roaming\npm\vs-tac-cli -> C:\Users\DBiele\AppData\Roaming\npm\node_modules\vs-tac\vs-tac-cli.cmd
1>  > edge@4.0.0 install C:\Users\DBiele\AppData\Roaming\npm\node_modules\vs-tac\node_modules\edge
1>  > node tools/install.js
1>  ***************************************
1>  [Error: The edge module has not been pre-compiled for node.js version v5.4.1. You must build a custom version of edge.node. Please refer to https://github.com/tjanczuk/edge for building instructions.]
1>  ***************************************
1>  Success: platform check for edge.js: node.js ia32 v5.4.1
1>  C:\Users\DBiele\AppData\Roaming\npm
1>  └─┬ vs-tac@1.0.28
1>    ├── adm-zip@0.4.4
1>    ├─┬ edge@4.0.0
1>    │ ├── edge-cs@0.2.7
1>    │ └── nan@2.2.0
1>    ├─┬ elementtree@0.1.6
1>    │ └── sax@0.3.5
1>    ├─┬ fstream@0.1.28
1>    │ ├── graceful-fs@3.0.8
1>    │ └── inherits@2.0.1
1>    ├── mkdirp@0.3.5
1>    ├── ncp@0.5.1
1>    ├─┬ optimist@0.6.1
1>    │ ├── minimist@0.0.10
1>    │ └── wordwrap@0.0.3
1>    ├─┬ plugman@0.22.4
1>    │ ├─┬ cordova-lib@0.21.6
1>    │ │ ├── bplist-parser@0.0.5
1>    │ │ ├─┬ cordova-js@3.6.2
1>    │ │ │ ├─┬ browserify@3.46.0
1>    │ │ │ │ ├─┬ assert@1.1.1
1>    │ │ │ │ │ └── util@0.10.2
1>    │ │ │ │ ├─┬ browser-pack@2.0.1
1>    │ │ │ │ │ ├─┬ combine-source-map@0.3.0
1>    │ │ │ │ │ │ ├── convert-source-map@0.3.4
1>    │ │ │ │ │ │ ├── inline-source-map@0.3.0
1>    │ │ │ │ │ │ └─┬ source-map@0.1.34
1>    │ │ │ │ │ │   └── amdefine@0.1.0
1>    │ │ │ │ │ └─┬ JSONStream@0.6.4
1>    │ │ │ │ │   ├── jsonparse@0.0.5
1>    │ │ │ │ │   └── through@2.2.7
1>    │ │ │ │ ├── browser-resolve@1.2.4
1>    │ │ │ │ ├─┬ browserify-zlib@0.1.4
1>    │ │ │ │ │ └── pako@0.2.3
1>    │ │ │ │ ├─┬ buffer@2.1.13
1>    │ │ │ │ │ ├── base64-js@0.0.7
1>    │ │ │ │ │ └── ieee754@1.1.3
1>    │ │ │ │ ├── builtins@0.0.4
1>    │ │ │ │ ├── commondir@0.0.1
1>    │ │ │ │ ├─┬ concat-stream@1.4.6
1>    │ │ │ │ │ ├─┬ readable-stream@1.1.13-1
1>    │ │ │ │ │ │ ├── core-util-is@1.0.1
1>    │ │ │ │ │ │ ├── isarray@0.0.1
1>    │ │ │ │ │ │ └── string_decoder@0.10.25-1
1>    │ │ │ │ │ └── typedarray@0.0.6
1>    │ │ │ │ ├── console-browserify@1.0.3
1>    │ │ │ │ ├── constants-browserify@0.0.1
1>    │ │ │ │ ├── crypto-browserify@1.0.9
1>    │ │ │ │ ├── deep-equal@0.1.2
1>    │ │ │ │ ├── defined@0.0.0
1>    │ │ │ │ ├─┬ deps-sort@0.1.2
1>    │ │ │ │ │ ├─┬ JSONStream@0.6.4
1>    │ │ │ │ │ │ ├── jsonparse@0.0.5
1>    │ │ │ │ │ │ └── through@2.2.7
1>    │ │ │ │ │ └── minimist@0.0.10
1>    │ │ │ │ ├─┬ derequire@0.8.0
1>    │ │ │ │ │ ├── esprima-fb@3001.1.0-dev-harmony-fb
1>    │ │ │ │ │ ├─┬ esrefactor@0.1.0
1>    │ │ │ │ │ │ ├── escope@0.0.16
1>    │ │ │ │ │ │ ├── esprima@1.0.4
1>    │ │ │ │ │ │ └── estraverse@0.0.4
1>    │ │ │ │ │ └── estraverse@1.5.0
1>    │ │ │ │ ├── domain-browser@1.1.2
1>    │ │ │ │ ├── duplexer@0.1.1
1>    │ │ │ │ ├── events@1.0.1
1>    │ │ │ │ ├─┬ glob@3.2.11
1>    │ │ │ │ │ └─┬ minimatch@0.3.0
1>    │ │ │ │ │   ├── lru-cache@2.5.0
1>    │ │ │ │ │   └── sigmund@1.0.0
1>    │ │ │ │ ├─┬ http-browserify@1.3.2
1>    │ │ │ │ │ └── Base64@0.2.1
1>    │ │ │ │ ├── https-browserify@0.0.0
1>    │ │ │ │ ├── inherits@2.0.1
1>    │ │ │ │ ├─┬ insert-module-globals@5.0.1
1>    │ │ │ │ │ ├─┬ lexical-scope@1.1.0
1>    │ │ │ │ │ │ └─┬ astw@1.1.0
1>    │ │ │ │ │ │   └── esprima-fb@3001.1.0-dev-harmony-fb
1>    │ │ │ │ │ └── process@0.6.0
1>    │ │ │ │ ├─┬ JSONStream@0.7.4
1>    │ │ │ │ │ └── jsonparse@0.0.5
1>    │ │ │ │ ├─┬ module-deps@1.10.0
1>    │ │ │ │ │ ├─┬ detective@3.1.0
1>    │ │ │ │ │ │ ├─┬ escodegen@1.1.0
1>    │ │ │ │ │ │ │ ├── esprima@1.0.4
1>    │ │ │ │ │ │ │ ├── estraverse@1.5.0
1>    │ │ │ │ │ │ │ ├── esutils@1.0.0
1>    │ │ │ │ │ │ │ └─┬ source-map@0.1.34
1>    │ │ │ │ │ │ │   └── amdefine@0.1.0
1>    │ │ │ │ │ │ └── esprima-fb@3001.1.0-dev-harmony-fb
1>    │ │ │ │ │ └── minimist@0.0.10
1>    │ │ │ │ ├── os-browserify@0.1.2
1>    │ │ │ │ ├── parents@0.0.2
1>    │ │ │ │ ├── path-browserify@0.0.0
1>    │ │ │ │ ├── punycode@1.2.4
1>    │ │ │ │ ├── querystring-es3@0.2.0
1>    │ │ │ │ ├── resolve@0.6.3
1>    │ │ │ │ ├── shallow-copy@0.0.1
1>    │ │ │ │ ├── shell-quote@0.0.1
1>    │ │ │ │ ├─┬ stream-browserify@0.1.3
1>    │ │ │ │ │ └── process@0.5.2
1>    │ │ │ │ ├── stream-combiner@0.0.4
1>    │ │ │ │ ├── string_decoder@0.0.1
1>    │ │ │ │ ├─┬ subarg@0.0.1
1>    │ │ │ │ │ └── minimist@0.0.10
1>    │ │ │ │ ├─┬ syntax-error@1.1.0
1>    │ │ │ │ │ └── esprima-fb@3001.1.0-dev-harmony-fb
1>    │ │ │ │ ├─┬ through2@0.4.2
1>    │ │ │ │ │ ├─┬ readable-stream@1.0.27-1
1>    │ │ │ │ │ │ ├── core-util-is@1.0.1
1>    │ │ │ │ │ │ ├── isarray@0.0.1
1>    │ │ │ │ │ │ └── string_decoder@0.10.25-1
1>    │ │ │ │ │ └─┬ xtend@2.1.2
1>    │ │ │ │ │   └── object-keys@0.4.0
1>    │ │ │ │ ├─┬ timers-browserify@1.0.1
1>    │ │ │ │ │ └── process@0.5.2
1>    │ │ │ │ ├── tty-browserify@0.0.0
1>    │ │ │ │ ├─┬ umd@2.0.0
1>    │ │ │ │ │ ├─┬ rfile@1.0.0
1>    │ │ │ │ │ │ ├── callsite@1.0.0
1>    │ │ │ │ │ │ └── resolve@0.3.1
1>    │ │ │ │ │ └─┬ ruglify@1.0.0
1>    │ │ │ │ │   └─┬ uglify-js@2.2.5
1>    │ │ │ │ │     ├─┬ optimist@0.3.7
1>    │ │ │ │ │     │ └── wordwrap@0.0.2
1>    │ │ │ │ │     └─┬ source-map@0.1.34
1>    │ │ │ │ │       └── amdefine@0.1.0
1>    │ │ │ │ ├── url@0.10.1
1>    │ │ │ │ ├── util@0.10.3
1>    │ │ │ │ └─┬ vm-browserify@0.0.4
1>    │ │ │ │   └── indexof@0.0.1
1>    │ │ │ ├── through@2.3.4
1>    │ │ │ └─┬ uglify-js@2.4.14
1>    │ │ │   ├── async@0.2.10
1>    │ │ │   ├─┬ optimist@0.3.7
1>    │ │ │   │ └── wordwrap@0.0.2
1>    │ │ │   ├─┬ source-map@0.1.34
1>    │ │ │   │ └── amdefine@0.1.0
1>    │ │ │   └── uglify-to-browserify@1.0.2
1>    │ │ ├─┬ dep-graph@1.1.0
1>    │ │ │ └── underscore@1.2.1
1>    │ │ ├─┬ elementtree@0.1.5
1>    │ │ │ └── sax@0.3.5
1>    │ │ ├─┬ glob@3.2.11
1>    │ │ │ ├── inherits@2.0.1
1>    │ │ │ └─┬ minimatch@0.3.0
1>    │ │ │   ├── lru-cache@2.5.0
1>    │ │ │   └── sigmund@1.0.0
1>    │ │ ├── mime@1.2.11
1>    │ │ ├─┬ npm@1.3.4
1>    │ │ │ ├── ini@1.1.0
1>    │ │ │ ├─┬ minimatch@0.2.12
1>    │ │ │ │ └── sigmund@1.0.0
1>    │ │ │ ├── mkdirp@0.3.5
1>    │ │ │ ├── osenv@0.0.3
1>    │ │ │ └─┬ request@2.21.0
1>    │ │ │   ├── aws-sign@0.3.0
1>    │ │ │   ├── cookie-jar@0.3.0
1>    │ │ │   ├─┬ form-data@0.0.8
1>    │ │ │   │ └─┬ combined-stream@0.0.4
1>    │ │ │   │   └── delayed-stream@0.0.5
1>    │ │ │   ├─┬ hawk@0.13.1
1>    │ │ │   │ ├─┬ boom@0.4.2
1>    │ │ │   │ │ └── hoek@0.9.1
1>    │ │ │   │ ├── hoek@0.8.5
1>    │ │ │   │ └─┬ sntp@0.2.4
1>    │ │ │   │   └── hoek@0.9.1
1>    │ │ │   ├─┬ http-signature@0.9.11
1>    │ │ │   │ ├── asn1@0.1.11
1>    │ │ │   │ ├── assert-plus@0.1.2
1>    │ │ │   │ └── ctype@0.5.2
1>    │ │ │   ├── json-stringify-safe@4.0.0
1>    │ │ │   ├── oauth-sign@0.3.0
1>    │ │ │   └── tunnel-agent@0.3.0
1>    │ │ ├─┬ npmconf@0.1.16
1>    │ │ │ ├─┬ config-chain@1.1.8
1>    │ │ │ │ └── proto-list@1.2.3
1>    │ │ │ ├── inherits@2.0.1
1>    │ │ │ ├── ini@1.1.0
1>    │ │ │ ├── mkdirp@0.3.5
1>    │ │ │ ├─┬ nopt@2.2.1
1>    │ │ │ │ └── abbrev@1.0.5
1>    │ │ │ └── once@1.3.0
1>    │ │ ├── osenv@0.0.3
1>    │ │ ├─┬ plist-with-patches@0.5.1
1>    │ │ │ ├── xmlbuilder@0.4.3
1>    │ │ │ └── xmldom@0.1.19
1>    │ │ ├── properties-parser@0.2.3
1>    │ │ ├── q@0.9.7
1>    │ │ ├─┬ rc@0.3.0
1>    │ │ │ ├── deep-extend@0.2.10
1>    │ │ │ ├── ini@1.1.0
1>    │ │ │ └─┬ optimist@0.3.7
1>    │ │ │   └── wordwrap@0.0.2
1>    │ │ ├─┬ request@2.22.0
1>    │ │ │ ├── aws-sign@0.3.0
1>    │ │ │ ├── cookie-jar@0.3.0
1>    │ │ │ ├── forever-agent@0.5.2
1>    │ │ │ ├─┬ form-data@0.0.8
1>    │ │ │ │ ├── async@0.2.10
1>    │ │ │ │ └─┬ combined-stream@0.0.4
1>    │ │ │ │   └── delayed-stream@0.0.5
1>    │ │ │ ├─┬ hawk@0.13.1
1>    │ │ │ │ ├─┬ boom@0.4.2
1>    │ │ │ │ │ └── hoek@0.9.1
1>    │ │ │ │ ├── cryptiles@0.2.2
1>    │ │ │ │ ├── hoek@0.8.5
1>    │ │ │ │ └─┬ sntp@0.2.4
1>    │ │ │ │   └── hoek@0.9.1
1>    │ │ │ ├─┬ http-signature@0.10.0
1>    │ │ │ │ ├── asn1@0.1.11
1>    │ │ │ │ ├── assert-plus@0.1.2
1>    │ │ │ │ └── ctype@0.5.2
1>    │ │ │ ├── json-stringify-safe@4.0.0
1>    │ │ │ ├── node-uuid@1.4.1
1>    │ │ │ ├── oauth-sign@0.3.0
1>    │ │ │ ├── qs@0.6.6
1>    │ │ │ └── tunnel-agent@0.3.0
1>    │ │ ├── semver@2.0.11
1>    │ │ ├── shelljs@0.1.4
1>    │ │ ├─┬ tar@0.1.19
1>    │ │ │ ├── block-stream@0.0.7
1>    │ │ │ ├─┬ fstream@0.1.27
1>    │ │ │ │ ├── graceful-fs@3.0.2
1>    │ │ │ │ ├── mkdirp@0.3.5
1>    │ │ │ │ └── rimraf@2.2.8
1>    │ │ │ └── inherits@2.0.1
1>    │ │ ├── underscore@1.4.4
1>    │ │ └─┬ xcode@0.6.6
1>    │ │   ├── node-uuid@1.3.3
1>    │ │   └── pegjs@0.6.2
1>    │ ├─┬ nopt@1.0.10
1>    │ │ └── abbrev@1.0.7
1>    │ ├─┬ npm@1.3.4
1>    │ │ ├─┬ cmd-shim@1.1.0
1>    │ │ │ └── graceful-fs@1.2.3
1>    │ │ ├── ini@1.1.0
1>    │ │ ├─┬ minimatch@0.2.12
1>    │ │ │ └── sigmund@1.0.0
1>    │ │ ├── mkdirp@0.3.5
1>    │ │ ├── osenv@0.0.3
1>    │ │ ├─┬ read-installed@0.2.2
1>    │ │ │ └── graceful-fs@1.2.3
1>    │ │ ├─┬ read-package-json@1.1.0
1>    │ │ │ └── graceful-fs@1.2.3
1>    │ │ ├─┬ request@2.21.0
1>    │ │ │ ├── aws-sign@0.3.0
1>    │ │ │ ├── cookie-jar@0.3.0
1>    │ │ │ ├─┬ form-data@0.0.8
1>    │ │ │ │ └─┬ combined-stream@0.0.4
1>    │ │ │ │   └── delayed-stream@0.0.5
1>    │ │ │ ├─┬ hawk@0.13.1
1>    │ │ │ │ ├─┬ boom@0.4.2
1>    │ │ │ │ │ └── hoek@0.9.1
1>    │ │ │ │ ├── hoek@0.8.5
1>    │ │ │ │ └─┬ sntp@0.2.4
1>    │ │ │ │   └── hoek@0.9.1
1>    │ │ │ ├─┬ http-signature@0.9.11
1>    │ │ │ │ ├── asn1@0.1.11
1>    │ │ │ │ ├── assert-plus@0.1.2
1>    │ │ │ │ └── ctype@0.5.2
1>    │ │ │ ├── json-stringify-safe@4.0.0
1>    │ │ │ ├── oauth-sign@0.3.0
1>    │ │ │ └── tunnel-agent@0.3.0
1>    │ │ ├─┬ rimraf@2.2.0
1>    │ │ │ └── graceful-fs@1.2.3
1>    │ │ └─┬ sha@1.0.1
1>    │ │   └── graceful-fs@1.2.3
1>    │ ├── q@0.9.7
1>    │ ├─┬ rc@0.3.0
1>    │ │ ├── deep-extend@0.2.11
1>    │ │ ├── ini@1.1.0
1>    │ │ └── optimist@0.3.7
1>    │ └── underscore@1.4.4
1>    ├── q@1.0.1
1>    ├─┬ request@2.36.0
1>    │ ├── aws-sign2@0.5.0
1>    │ ├── forever-agent@0.5.2
1>    │ ├─┬ form-data@0.1.4
1>    │ │ ├── async@0.9.2
1>    │ │ └─┬ combined-stream@0.0.7
1>    │ │   └── delayed-stream@0.0.5
1>    │ ├─┬ hawk@1.0.0
1>    │ │ ├── boom@0.4.2
1>    │ │ ├── cryptiles@0.2.2
1>    │ │ ├── hoek@0.9.1
1>    │ │ └── sntp@0.2.4
1>    │ ├─┬ http-signature@0.10.1
1>    │ │ ├── asn1@0.1.11
1>    │ │ ├── assert-plus@0.1.5
1>    │ │ └── ctype@0.5.3
1>    │ ├── json-stringify-safe@5.0.1
1>    │ ├── mime@1.2.11
1>    │ ├── node-uuid@1.4.7
1>    │ ├── oauth-sign@0.3.0
1>    │ ├── qs@0.6.6
1>    │ ├── tough-cookie@2.2.1
1>    │ └── tunnel-agent@0.4.2
1>    ├── rimraf@2.2.6
1>    ├─┬ ripple-emulator@0.9.32
1>    │ ├── accounting@0.4.1
1>    │ ├── colors@0.6.0-1
1>    │ ├── connect-xcors@0.5.2
1>    │ ├─┬ express@3.1.0
1>    │ │ ├── buffer-crc32@0.1.1
1>    │ │ ├── commander@0.6.1
1>    │ │ ├─┬ connect@2.7.2
1>    │ │ │ ├── bytes@0.1.0
1>    │ │ │ ├── formidable@1.0.11
1>    │ │ │ ├── pause@0.0.1
1>    │ │ │ └── qs@0.5.1
1>    │ │ ├── cookie@0.0.5
1>    │ │ ├── cookie-signature@0.0.1
1>    │ │ ├─┬ debug@2.2.0
1>    │ │ │ └── ms@0.7.1
1>    │ │ ├── fresh@0.1.0
1>    │ │ ├── methods@0.0.1
1>    │ │ ├── mkdirp@0.3.3
1>    │ │ ├── range-parser@0.0.4
1>    │ │ └─┬ send@0.1.0
1>    │ │   └── mime@1.2.6
1>    │ ├── moment@1.7.2
1>    │ ├── open@0.0.3
1>    │ └─┬ request@2.12.0
1>    │   └─┬ form-data@0.0.3
1>    │     └─┬ combined-stream@0.0.3
1>    │       └── delayed-stream@0.0.5
1>    ├── semver@2.3.1
1>    └─┬ tar@0.1.20
1>      └── block-stream@0.0.8
1>  ------ npm install of vs-tac@1.0.28 from C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 14.0\COMMON7\IDE\EXTENSIONS\APACHECORDOVATOOLS\packages\vs-tac completed.
1>  ------ Installing Cordova tools cordova@5.4.1 for project from npm. This could take a few minutes...
1>  Each package is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. Some packages may include dependencies which are governed by additional licenses. Follow the package source (feed) URL to determine any dependencies.
1>  npm WARN deprecated npmconf@2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm
1>  npm ERR! Windows_NT 6.3.9600
1>  npm ERR! argv "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Users\\DBiele\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "cordova@5.4.1" "--loglevel" "warn"
1>  npm ERR! node v5.4.1
1>  npm ERR! npm  v3.3.6
1>
1>  npm ERR! Cannot read property 'localeCompare' of undefined
1>  npm ERR!
1>MDAVSCLI : npm ERR! If you need help, you may report this error at:
1>  npm ERR!     <https://github.com/npm/npm/issues>
1>
1>  npm ERR! Please include the following file with any support request:
1>  npm ERR!     C:\Users\DBiele\AppData\Roaming\npm\node_modules\vs-tac\node_modules\cordova\5.4.1\npm-debug.log
1>  [Error: ------ npm install failed. Exit code: 1]
1>  C:\Users\DBiele\AppData\Roaming\npm\node_modules\vs-tac\node_modules\q\q.js:126
1>                      throw e;
1>                      ^
1>
1>MDAVSCLI : error : ------ npm install failed. Exit code: 1
1>      at ChildProcess.<anonymous> (C:\Users\DBiele\AppData\Roaming\npm\node_modules\vs-tac\lib\util.js:655:29)
1>      at emitTwo (events.js:87:13)
1>      at ChildProcess.emit (events.js:172:7)
1>      at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========

========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========

When I use powershell or cmd to install cordova npm install -g cordova I get the following error

当我使用powershell或cmd安装cordova npm安装-g cordova时,我得到以下错误。

C:\Users\DBiele>npm install -g cordova
npm WARN deprecated npmconf@2.1.2: this package has been reintegrated into npm a
nd is now out of date with respect to npm
npm WARN install:isarray ENOENT: no such file or directory, rename 'C:\Users\DBi
ele\AppData\Roaming\npm\node_modules\cordova\node_modules\buffer\node_modules\is
array' -> 'C:\Users\DBiele\AppData\Roaming\npm\node_modules\cordova\node_modules
\buffer\node_modules\isarray'
npm WARN install:negotiator ENOENT: no such file or directory, rename 'C:\Users\
DBiele\AppData\Roaming\npm\node_modules\cordova\node_modules\express\node_module
s\negotiator' -> 'C:\Users\DBiele\AppData\Roaming\npm\node_modules\cordova\node_
modules\express\node_modules\negotiator'
npm WARN install:vary ENOENT: no such file or directory, rename 'C:\Users\DBiele
\AppData\Roaming\npm\node_modules\cordova\node_modules\express\node_modules\vary
' -> 'C:\Users\DBiele\AppData\Roaming\npm\node_modules\cordova\node_modules\expr
ess\node_modules\vary'
npm WARN install:object-assign ENOENT: no such file or directory, rename 'C:\Use
rs\DBiele\AppData\Roaming\npm\node_modules\cordova\node_modules\got\node_modules
\object-assign' -> 'C:\Users\DBiele\AppData\Roaming\npm\node_modules\cordova\nod
e_modules\got\node_modules\object-assign'
npm WARN install:convert-source-map ENOENT: no such file or directory, rename 'C
:\Users\DBiele\AppData\Roaming\npm\node_modules\cordova\node_modules\insert-modu
le-globals\node_modules\convert-source-map' -> 'C:\Users\DBiele\AppData\Roaming\
npm\node_modules\cordova\node_modules\insert-module-globals\node_modules\convert
-source-map'
npm WARN install:graceful-fs ENOENT: no such file or directory, rename 'C:\Users
\DBiele\AppData\Roaming\npm\node_modules\cordova\node_modules\write-file-atomic\
node_modules\graceful-fs' -> 'C:\Users\DBiele\AppData\Roaming\npm\node_modules\c
ordova\node_modules\read-package-json\node_modules\graceful-fs'
npm WARN install:deep-extend ENOENT: no such file or directory, rename 'C:\Users
\DBiele\AppData\Roaming\npm\node_modules\cordova\node_modules\registry-url\node_
modules\deep-extend' -> 'C:\Users\DBiele\AppData\Roaming\npm\node_modules\cordov
a\node_modules\registry-url\node_modules\deep-extend'
npm WARN install:strip-json-comments ENOENT: no such file or directory, rename '
C:\Users\DBiele\AppData\Roaming\npm\node_modules\cordova\node_modules\registry-u
rl\node_modules\strip-json-comments' -> 'C:\Users\DBiele\AppData\Roaming\npm\nod
e_modules\cordova\node_modules\registry-url\node_modules\strip-json-comments'
npm WARN install:mime-types ENOENT: no such file or directory, rename 'C:\Users\
DBiele\AppData\Roaming\npm\node_modules\cordova\node_modules\request\node_module
s\mime-types' -> 'C:\Users\DBiele\AppData\Roaming\npm\node_modules\cordova\node_
modules\request\node_modules\mime-types'
npm WARN install:qs ENOENT: no such file or directory, rename 'C:\Users\DBiele\A
ppData\Roaming\npm\node_modules\cordova\node_modules\request\node_modules\qs' ->
 'C:\Users\DBiele\AppData\Roaming\npm\node_modules\cordova\node_modules\request\
node_modules\qs'
isarray@1.0.0 node_modules\cordova\node_modules\buffer\node_modules\isarray -> n
ode_modules\cordova\node_modules\buffer\node_modules\isarray
negotiator@0.5.3 node_modules\cordova\node_modules\express\node_modules\negotiat
or -> node_modules\cordova\node_modules\express\node_modules\negotiator
accepts@1.2.13 node_modules\cordova\node_modules\express\node_modules\accepts ->
 node_modules\cordova\node_modules\express\node_modules\accepts
vary@1.0.1 node_modules\cordova\node_modules\express\node_modules\vary -> node_m
odules\cordova\node_modules\express\node_modules\vary
object-assign@3.0.0 node_modules\cordova\node_modules\got\node_modules\object-as
sign -> node_modules\cordova\node_modules\got\node_modules\object-assign
convert-source-map@1.1.3 node_modules\cordova\node_modules\insert-module-globals
\node_modules\convert-source-map -> node_modules\cordova\node_modules\insert-mod
ule-globals\node_modules\convert-source-map
graceful-fs@4.1.2 node_modules\cordova\node_modules\write-file-atomic\node_modul
es\graceful-fs -> node_modules\cordova\node_modules\read-package-json\node_modul
es\graceful-fs
deep-extend@0.4.0 node_modules\cordova\node_modules\registry-url\node_modules\de
ep-extend -> node_modules\cordova\node_modules\registry-url\node_modules\deep-ex
tend
strip-json-comments@1.0.4 node_modules\cordova\node_modules\registry-url\node_mo
dules\strip-json-comments -> node_modules\cordova\node_modules\registry-url\node
_modules\strip-json-comments
mime-types@1.0.2 node_modules\cordova\node_modules\request\node_modules\mime-typ
es -> node_modules\cordova\node_modules\request\node_modules\mime-types
qs@2.3.3 node_modules\cordova\node_modules\request\node_modules\qs -> node_modul
es\cordova\node_modules\request\node_modules\qs
readable-stream@1.0.33 node_modules\cordova\node_modules\cordova-lib\node_module
s\request\node_modules\bl\node_modules\readable-stream -> node_modules\cordova\n
ode_modules\browser-pack\node_modules\readable-stream
bl@0.9.4 node_modules\cordova\node_modules\cordova-lib\node_modules\request\node
_modules\bl -> node_modules\cordova\node_modules\bl
request@2.47.0 node_modules\cordova\node_modules\cordova-lib\node_modules\reques
t -> node_modules\cordova\node_modules\request
npmconf@2.1.2 node_modules\cordova\node_modules\cordova-lib\node_modules\npmconf
 -> node_modules\cordova\node_modules\npmconf
glob@4.0.6 node_modules\cordova\node_modules\cordova-lib\node_modules\glob -> no
de_modules\cordova\node_modules\glob
tar@1.0.2 node_modules\cordova\node_modules\cordova-lib\node_modules\tar -> node
_modules\cordova\node_modules\tar
- C:\Users\DBiele\AppData\Roaming\npm\node_modules\cordova\node_modules\write-fi
le-atomic node_modules\cordova\node_modules\write-file-atomic
C:\Users\DBiele\AppData\Roaming\npm
└── (empty)

npm ERR! code 1

-------------------------------Update 2 1/15/2016------------------------ It now appears to be working! I used Michael Braude's comment to npm -g install npm and it works.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - update 2 1/15/2016 - - - - - - - - - - - - - - - - - - - - - - - -现在似乎是工作!我使用了Michael Braude对npm -g安装npm的评论。

However, before the fix I did the following:

然而,在修复之前,我做了以下工作:

  1. removed Node using add and remove programs
  2. 使用添加和删除程序删除节点。
  3. removed NPM by deleting the NPM folder in roaming.
  4. 删除NPM通过删除漫游中的NPM文件夹。
  5. Repaired VS2015
  6. 修复VS2015

After using npm -g install npm I updated node to 5.4.1 - 64 bit, I also checked to make sure NPM 3.5.4 worked and used npm -g install npm@3.5.4 and it worked.

在使用npm -g安装npm后,我将节点更新到5.4.1 - 64位,我还检查了npm 3.5.4的工作,并使用npm -g安装npm@3.5.4,并进行了工作。

In addition, I changed the sandboxed (I think?) version of Node and NPM by adding C:\Program Files (x86)\nodejs to Tools > Options > Projects and Solutions > External Web Tools 更新节点& NPM VS Cordova更新5。

此外,我改变了沙箱(我认为)版本的节点和NPM通过添加C:\Program Files (x86)\nodejs工具>选项> >外部Web工具项目和解决方案

I am now able to run my gulp task using Task Runner Explorer without getting errors. Crossing fingers that it continues to work!

现在,我可以使用task Runner Explorer运行我的gulp任务,而不会出错。交叉手指,它继续工作!

3 个解决方案

#1


15  

The problem is that the version of npm that is bundled with the "latest stable" version of node does not properly install some of our npm packages. To fix this, open a command prompt and run:

问题是,与“最新稳定版”节点绑定的npm版本没有正确地安装我们的一些npm包。要解决这个问题,请打开命令提示符并运行:

npm -g install npm

To update npm to the latest version. This should fix the problem.

更新npm到最新版本。这应该能解决问题。

Edit 2/5/2016 - We have release Update 6 which fixes this problem. See our blog for more info: http://microsoft.github.io/vstacoblog/2016/02/04/announcing-update-6.html

编辑2/5/2016 -我们已经发布了更新6,解决了这个问题。查看我们的博客,了解更多信息:http://microsoft.github.io/vstacoblog/2016/02/04/announcing-update-6.html。

(Disclosure: I work on the tools for Apache Cordova in Visual Studio)

(披露:我在Visual Studio中为Apache Cordova提供工具)

#2


7  

Okay I had to do a combination of things to get this working.

好吧,我必须把这些东西结合起来才能完成这项工作。

First of all vs-tac uses edge v4 which is not compatible with node v5 so you will need to edit the vs-tac package.json file so it refers to v5 rather than v4 (it seems to work for me but your mileage may vary)

首先,vs-tac使用与节点v5不兼容的edge v4,因此您需要编辑vs-tac包。json文件是指v5而不是v4(它似乎对我有用,但您的里程可能有所不同)

Next as Michael Braude mentioned, you will also need this;

就像Michael Braude提到的,你也需要这个;

npm -g install npm

Finally you should be able to reinstall vs-tac with this;

最后,您应该能够使用这个重新安装vs-tac;

npm install -g "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\ApacheCordovaTools\Packages\vs-tac"

If the result of this is not an error then double check that the file vstac_installing.tmp has been removed from your global node_modules folder (c:\users\myuser\AppData\Roaming\npm\node_modules) - I had to manually remove it on my machine.

如果这不是一个错误,那么再次检查文件vstac_install。tmp已经从您的全局node_modules文件夹中删除(c:\用户\myuser\AppData\ \npm\node_modules) -我必须手动删除它在我的机器上。

After all that my hello world project finally runs in the emulator!

毕竟我的hello world项目终于在模拟器中运行了!

Good luck...

祝你好运…

#3


3  

Looks like npm deprecated npmconf but does not automatically remove it as some package might still rely on it. My cordova runs again after uninstalling nmpconf and then updating cordova:

看起来npm不支持npmconf,但是不会自动删除它,因为某些包可能仍然依赖于它。在卸载nmpconf之后,我的cordova再次运行,然后更新cordova:

npm uninstall -g npmconf
npm install -g cordova

#1


15  

The problem is that the version of npm that is bundled with the "latest stable" version of node does not properly install some of our npm packages. To fix this, open a command prompt and run:

问题是,与“最新稳定版”节点绑定的npm版本没有正确地安装我们的一些npm包。要解决这个问题,请打开命令提示符并运行:

npm -g install npm

To update npm to the latest version. This should fix the problem.

更新npm到最新版本。这应该能解决问题。

Edit 2/5/2016 - We have release Update 6 which fixes this problem. See our blog for more info: http://microsoft.github.io/vstacoblog/2016/02/04/announcing-update-6.html

编辑2/5/2016 -我们已经发布了更新6,解决了这个问题。查看我们的博客,了解更多信息:http://microsoft.github.io/vstacoblog/2016/02/04/announcing-update-6.html。

(Disclosure: I work on the tools for Apache Cordova in Visual Studio)

(披露:我在Visual Studio中为Apache Cordova提供工具)

#2


7  

Okay I had to do a combination of things to get this working.

好吧,我必须把这些东西结合起来才能完成这项工作。

First of all vs-tac uses edge v4 which is not compatible with node v5 so you will need to edit the vs-tac package.json file so it refers to v5 rather than v4 (it seems to work for me but your mileage may vary)

首先,vs-tac使用与节点v5不兼容的edge v4,因此您需要编辑vs-tac包。json文件是指v5而不是v4(它似乎对我有用,但您的里程可能有所不同)

Next as Michael Braude mentioned, you will also need this;

就像Michael Braude提到的,你也需要这个;

npm -g install npm

Finally you should be able to reinstall vs-tac with this;

最后,您应该能够使用这个重新安装vs-tac;

npm install -g "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\ApacheCordovaTools\Packages\vs-tac"

If the result of this is not an error then double check that the file vstac_installing.tmp has been removed from your global node_modules folder (c:\users\myuser\AppData\Roaming\npm\node_modules) - I had to manually remove it on my machine.

如果这不是一个错误,那么再次检查文件vstac_install。tmp已经从您的全局node_modules文件夹中删除(c:\用户\myuser\AppData\ \npm\node_modules) -我必须手动删除它在我的机器上。

After all that my hello world project finally runs in the emulator!

毕竟我的hello world项目终于在模拟器中运行了!

Good luck...

祝你好运…

#3


3  

Looks like npm deprecated npmconf but does not automatically remove it as some package might still rely on it. My cordova runs again after uninstalling nmpconf and then updating cordova:

看起来npm不支持npmconf,但是不会自动删除它,因为某些包可能仍然依赖于它。在卸载nmpconf之后,我的cordova再次运行,然后更新cordova:

npm uninstall -g npmconf
npm install -g cordova