将npm更新为@angular 2不可用

我想从angular度2 Beta 15升级到angular度2 RC1。

我正在使用Visual Studio 2015。

在Visual Studio中,我在npm package.json中执行:

"dependencies": { "@angular/core": "Unavailable", } 

但我无法使用。

然后我做了一些更新:

 I updated my nodejs to v6.1.0. I updated my npm to v3.8.9. 

它仍然显示在Visual Studio 2015中不可用。

我还能尝试做些什么?

UPDATE

在做了@David Pine之后,我提出了这个错误:

 ====Executing command 'npm install'==== npm WARN package.json ASP.NET@0.0.0 No description npm WARN package.json ASP.NET@0.0.0 No repository field. npm WARN package.json ASP.NET@0.0.0 No README data npm http GET https://registry.npmjs.org/angular/core npm http 404 https://registry.npmjs.org/angular/core npm ERR! 404 Not Found npm ERR! 404 npm ERR! 404 'angular/core' is not in the npm registry. npm ERR! 404 You should bug the author to publish it npm ERR! 404 It was specified as a dependency of 'ASP.NET' npm ERR! 404 npm ERR! 404 Note that you can also install from a npm ERR! 404 tarball, folder, or http url, or git url. npm ERR! System Windows_NT 6.2.9200 npm ERR! command "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\IDE\\Extensions\\Microsoft\\Web Tools\\External\\\\node\\node" "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\IDE\\Extensions\\Microsoft\\Web Tools\\External\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" npm ERR! cwd C:\TGB.2016\TGB.Web npm ERR! node -v v0.10.31 npm ERR! npm -v 1.4.9 npm ERR! code E404 ====npm command completed with exit code 1==== 

更新2

我也在我的Visual Studio选项中添加了nodejs的正确path:

Synchronize Node.JS Install Version with Visual Studio 2015

确保Node.js位于Visual Studio中外部Web工具path的顶部,在此处详细介绍。

我发现Visual Studio 2015在与npm集成方面可能是不可靠的。 而不是依靠VS为你更新它,打开package.json并手动input你正在寻找的版本。

代替:

 "dependencies": { "@angular/core": "Unavailable", } 

input:

 "dependencies": { "@angular/core": "2.0.0-rc.1", } 

在你的项目文件夹中打开命令提示符(cmd)并键入'npm install'或者检查这个线程

该线程的解决scheme对我来说。

project.json仍然没有显示@angular模块,但是一旦你保存了project.json,它将通过npm安装所有的依赖关系。

关注这篇文章: