angular2 npm http 404与所有rc1包

时间:2016-05-04 19:31:54

标签: npm angular

尝试升级到Angular2 rc1,但似乎npm无法下载软件包:

{
  "name": "App",
  "version": "1.0.0",
  "license": "MIT",
  "dependencies": {
    "@angular/common": "2.0.0-rc.1",
    "@angular/compiler": "2.0.0-rc.1",
    "@angular/core": "2.0.0-rc.1",
    "@angular/platform-browser": "2.0.0-rc.1",
    "@angular/platform-browser-dynamic": "2.0.0-rc.1",
    "@angular/router": "2.0.0-rc.1",
    "@angular/http": "2.0.0-rc.1",

    "systemjs": "0.19.27",
    "es6-shim": "^0.35.0",
    "reflect-metadata": "^0.1.3",
    "rxjs": "5.0.0-beta.6",
    "zone.js": "^0.6.12"
  },
  "devDependencies": {
     "gulp": "3.9.1",
     "gulp-rimraf": "0.2.0",
     "gulp-uglify": "1.5.3",
     "gulp-concat": "2.6.0",
     "gulp-cssmin": "0.1.7",
     "gulp-replace": "0.5.4"
   }
}

和输出:

npm http GET https://registry.npmjs.org/es6-shim
npm http GET https://registry.npmjs.org/reflect-metadata
npm http GET https://registry.npmjs.org/angular/common
npm http GET https://registry.npmjs.org/angular/compiler
npm http GET https://registry.npmjs.org/angular/core
npm http GET https://registry.npmjs.org/angular/platform-browser-dynamic
npm http GET https://registry.npmjs.org/rxjs
npm http GET https://registry.npmjs.org/angular/router
npm http GET https://registry.npmjs.org/angular/http
npm http GET https://registry.npmjs.org/systemjs
npm http GET https://registry.npmjs.org/zone.js
npm http GET https://registry.npmjs.org/angular/platform-browser
npm http 304 https://registry.npmjs.org/reflect-metadata
npm http 404 https://registry.npmjs.org/angular/common
npm ERR! 404 Not Found
npm ERR! 404 
npm ERR! 404 'angular/common' 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 'App'
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.1.7601
npm ERR! command "npm" "install"
npm ERR! cwd ...
npm ERR! node -v v0.10.31
npm ERR! npm -v 1.4.9
npm ERR! code E404
npm http 404 https://registry.npmjs.org/angular/platform-browser-dynamic
npm http 404 https://registry.npmjs.org/angular/core
npm http 404 https://registry.npmjs.org/angular/compiler
npm http 304 https://registry.npmjs.org/systemjs
npm http 304 https://registry.npmjs.org/es6-shim
npm http 304 https://registry.npmjs.org/rxjs
npm http 404 https://registry.npmjs.org/angular/http
npm http 404 https://registry.npmjs.org/angular/platform-browser
npm http 404 https://registry.npmjs.org/angular/router
npm http 304 https://registry.npmjs.org/zone.js

所有gulp软件包都已成功下载,告诉我我的环境正常运行。那么它必须是注册的东西吗?

4 个答案:

答案 0 :(得分:8)

您需要升级节点和npm安装。至少,我在使用节点0.10和一些类似的古老版本的npm时得到了同样的错误,现在我已升级到节点6.0.0和npm 3.8.6然后一切正常。

答案 1 :(得分:0)

试试这个:

npm set registry http://registry.npmjs.org

https://github.com/angular/angular/issues/8483

答案 2 :(得分:0)

请检查.npmrc文件。它应该有registry = http://registry.npmjs.org

答案 3 :(得分:0)

尝试按命令提示符安装。 转到根目录并使用命令:npm install

它应该安装所有node_module。 它对我有用。