无法在Visual Studio 2015中恢复npm依赖项

时间:2016-05-17 22:02:47

标签: visual-studio visual-studio-2015 npm

Visual Studio突然无法恢复npm依赖项。

====Executing command 'npm install'====


npm WARN package.json Angular2AspNetCoreDemo@0.0.0 No description
npm WARN package.json Angular2AspNetCoreDemo@0.0.0 No repository field.
npm WARN package.json Angular2AspNetCoreDemo@0.0.0 No README data
npm http GET https://registry.npmjs.org/systemjs
npm http GET https://registry.npmjs.org/bootstrap
npm http GET https://registry.npmjs.org/angular/compiler
npm http GET https://registry.npmjs.org/angular/common
npm ERR! TypeError: Cannot read property '2.0.0-rc.0' of undefined
npm ERR!     at D:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\npm\node_modules\npm\lib\cache.js:844:27
npm ERR!     at RegClient.get_ (D:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\npm\node_modules\npm-registry-client\lib\get.js:111:14)
npm ERR!     at RegClient.<anonymous> (D:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\npm\node_modules\npm-registry-client\lib\get.js:47:12)
npm ERR!     at fs.js:271:14
npm ERR!     at D:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\npm\node_modules\graceful-fs\graceful-fs.js:105:5
npm ERR!     at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>
npm ERR! System Windows_NT 6.2.9200
npm ERR! command "D:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\IDE\\Extensions\\Microsoft\\Web Tools\\External\\\\node\\node" "D:\\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 F:\BanksySan\Development\AspNet5Angular2Demo\src\AspNet5Angular2Demo
npm ERR! node -v v0.10.31
npm ERR! npm -v 1.4.9
npm ERR! type non_object_property_load
npm http GET https://registry.npmjs.org/angular/platform-browser
npm ERR! TypeError: Cannot read property '2.0.0-rc.0' of undefined
npm ERR!     at D:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\npm\node_modules\npm\lib\cache.js:844:27
npm ERR!     at RegClient.get_ (D:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\npm\node_modules\npm-registry-client\lib\get.js:111:14)
npm ERR!     at RegClient.<anonymous> (D:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\npm\node_modules\npm-registry-client\lib\get.js:47:12)
npm ERR!     at fs.js:271:14
npm ERR!     at D:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\npm\node_modules\graceful-fs\graceful-fs.js:105:5
npm ERR!     at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>
npm ERR! System Windows_NT 6.2.9200
npm ERR! command "D:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\IDE\\Extensions\\Microsoft\\Web Tools\\External\\\\node\\node" "D:\\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 F:\BanksySan\Development\AspNet5Angular2Demo\src\AspNet5Angular2Demo
npm ERR! node -v v0.10.31
npm ERR! npm -v 1.4.9
npm ERR! type non_object_property_load
npm http GET https://registry.npmjs.org/angular/platform-browser-dynamic
npm http GET https://registry.npmjs.org/angular/upgrade
npm http GET https://registry.npmjs.org/angular/router-deprecated
npm http GET https://registry.npmjs.org/path
npm http GET https://registry.npmjs.org/typescript
npm http GET https://registry.npmjs.org/gulp-clean
npm http GET https://registry.npmjs.org/gulp
npm http GET https://registry.npmjs.org/fs
npm http GET https://registry.npmjs.org/gulp-concat
npm http GET https://registry.npmjs.org/gulp-typescript
npm http GET https://registry.npmjs.org/lite-server
npm http GET https://registry.npmjs.org/typings
npm http 304 https://registry.npmjs.org/bootstrap
npm http 404 https://registry.npmjs.org/angular/platform-browser
npm http 404 https://registry.npmjs.org/angular/common
npm ERR! 404 Not Found
npm ERR! 404 
npm ERR! 404 'angular/platform-browser' 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 'Angular2AspNetCoreDemo'
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 "D:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\IDE\\Extensions\\Microsoft\\Web Tools\\External\\\\node\\node" "D:\\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 F:\BanksySan\Development\AspNet5Angular2Demo\src\AspNet5Angular2Demo
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 200 https://registry.npmjs.org/path
npm http 404 https://registry.npmjs.org/angular/router-deprecated
npm http 200 https://registry.npmjs.org/typescript
npm http 304 https://registry.npmjs.org/gulp
npm http 200 https://registry.npmjs.org/fs
npm http 304 https://registry.npmjs.org/systemjs
npm http 304 https://registry.npmjs.org/gulp-concat
npm http 304 https://registry.npmjs.org/gulp-typescript
npm http 304 https://registry.npmjs.org/gulp-clean
npm http 304 https://registry.npmjs.org/typings
npm http 404 https://registry.npmjs.org/angular/compiler
npm http 304 https://registry.npmjs.org/lite-server
npm http 404 https://registry.npmjs.org/angular/upgrade
npm

====npm command completed with exit code 1====

package.json尚未更改。它看起来像这样:

{
  "version": "0.0.0",
  "name": "Angular2AspNetCoreDemo",
  "scripts": { "postinstall": "typings install" },
  "dependencies": {
    "@angular/common": "2.0.0-rc.0",
    "@angular/compiler": "2.0.0-rc.0",
    "@angular/core": "2.0.0-rc.0",
    "@angular/http": "2.0.0-rc.0",
    "@angular/platform-browser": "2.0.0-rc.0",
    "@angular/platform-browser-dynamic": "2.0.0-rc.0",
    "@angular/router-deprecated": "2.0.0-rc.0",
    "@angular/upgrade": "2.0.0-rc.0",
    "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",

    "angular2-in-memory-web-api": "0.0.5",
    "bootstrap": "^3.3.6"
  },
  "devDependencies": {
    "typescript": "^1.8.10",
    "gulp": "^3.9.1",
    "path": "^0.12.7",
    "gulp-clean": "^0.3.2",
    "fs": "^0.0.2",
    "gulp-concat": "^2.6.0",
    "gulp-typescript": "^2.13.1",
    "lite-server": "^2.2.0",
    "typings": "^0.8.1"
  }
}

0 个答案:

没有答案