如何更新node.js中的量angular器npm模块?
我为Visual Studio使用Visual Studio 2013 Node.js工具。
我想更新量angular器到这个:
https://www.npmjs.org/package/protractor
在Visual Studio中的npm下,我看到它显示我有protractor@0.24.2模块。 当我右键点击此并select
update npm module
它去
https://registry.npmjs.org/protractor
当我在URL中input时,在第一行1.0.0-rc2
上显示最新版本:
https://registry.npmjs.org/protractor {"_id":"protractor","_rev":"103-dc957e08fce862ad70c481b4a2327ee6", "name":"protractor","description":"Webdriver E2E test wrapper for Angular.", "dist-tags":{"latest":"1.0.0-rc2"}, "versions":{"0.1.0":{"name":"protractor", "description":"End to End test helpers for Angular.", "homepage":"https://github.com/juliemr/protractor","keywords":
在输出窗口中显示更新:
====Executing command 'npm update protractor --save'==== npm http GET https://registry.npmjs.org/protractor npm http 304 https://registry.npmjs.org/protractor npm http GET https://registry.npmjs.org/selenium-webdriver npm http GET https://registry.npmjs.org/jasminewd npm http GET https://registry.npmjs.org/glob npm http GET https://registry.npmjs.org/saucelabs npm http GET https://registry.npmjs.org/adm-zip npm http GET https://registry.npmjs.org/optimist npm http GET https://registry.npmjs.org/lodash npm http GET https://registry.npmjs.org/q npm http GET https://registry.npmjs.org/source-map-support npm http 304 https://registry.npmjs.org/selenium-webdriver npm http 304 https://registry.npmjs.org/jasminewd npm http 304 https://registry.npmjs.org/saucelabs npm http 304 https://registry.npmjs.org/optimist npm http 304 https://registry.npmjs.org/q npm http 304 https://registry.npmjs.org/glob npm http 304 https://registry.npmjs.org/adm-zip npm http 304 https://registry.npmjs.org/lodash npm http 304 https://registry.npmjs.org/source-map-support npm http GET https://registry.npmjs.org/inherits npm http GET https://registry.npmjs.org/minimatch npm http GET https://registry.npmjs.org/wordwrap npm http GET https://registry.npmjs.org/minimist npm http GET https://registry.npmjs.org/source-map npm http 304 https://registry.npmjs.org/inherits npm http 304 https://registry.npmjs.org/minimatch npm http 304 https://registry.npmjs.org/wordwrap npm http 304 https://registry.npmjs.org/minimist npm http 304 https://registry.npmjs.org/source-map npm http GET https://registry.npmjs.org/lru-cache npm http GET https://registry.npmjs.org/sigmund npm http 304 https://registry.npmjs.org/lru-cache npm http 304 https://registry.npmjs.org/sigmund npm http GET https://registry.npmjs.org/amdefine npm http 304 https://registry.npmjs.org/amdefine protractor@0.24.2 node_modules\protractor ├── jasminewd@1.0.1 ├── saucelabs@0.1.1 ├── q@1.0.0 ├── adm-zip@0.4.4 ├── optimist@0.6.1 (wordwrap@0.0.2, minimist@0.0.10) ├── lodash@2.4.1 ├── glob@3.2.11 (inherits@2.0.1, minimatch@0.3.0) ├── source-map-support@0.2.7 (source-map@0.1.32) └── selenium-webdriver@2.42.0 ====npm command completed with exit code 0====
我想知道的是,如果第一行显示1.0.0-rc2
作为最新版本,那为什么它仍然显示量angular器0.24.2作为更新后下载的版本?
“npm update”命令实际上并不是无条件升级包。 它只是将package升级到允许的最大semver,如package.json文件中针对您的依赖关系及其子依赖项所述。 要实际升级到更新的版本,您有两个select:
-
使用“npm install”并指定要安装的版本。 您可以使用“最新”标签来指定最新版本,而无需查看它。 使用“–save”标志让npm编辑你的package.json文件并更新到新版本。
npm安装量angular器@ latest –save
-
编辑package.json并find带有“量angular器”的行:“0.24.2”,并将版本更改为“1.0.0-rc2”(或者你想要的版本)。 然后在更改并保存文件后,可以运行“npm update”或“npm install”。
- 严重依赖关系中的警告:require函数以无法静态提取依赖关系的方式使用
- 在conf.js的插件configuration中使用Protractor参数值
- 交叉源请求被阻止:相同的来源策略不允许读取远程… CORS头'Access-Control-Allow-Origin'丢失
- 我如何在Angularjs量angular器中使用系统环境variables?
- Angular 2 CLIvariables不会被更新
- Angular 4生产部署工作stream程
- 更新到Angular 2后,无法通过Firefox上的Protractor运行Selenium
- 如何摆脱量angular器的循环?
- 无法在Linux Ubuntu上安装npm @ angular / cli