获取依赖关系时出错Ionic Framework 2

时间:2017-04-05 11:21:29

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

我在尝试获取Ionic Framework 2的依赖项时遇到错误。我正在使用Visual Studio 2015。

这是我在尝试恢复依赖项时遇到的错误:

====Executing command 'npm install'====
znpm http GET http://registry.npmjs.org/angular/compiler
npm http GET http://registry.npmjs.org/angular/common
npm http GET http://registry.npmjs.org/angular/compiler-cli
npm http GET http://registry.npmjs.org/sw-toolbox
npm http GET http://registry.npmjs.org/ionic-angular
npm http GET http://registry.npmjs.org/rxjs
npm http GET http://registry.npmjs.org/angular/core
npm http GET http://registry.npmjs.org/zone.js
npm http GET http://registry.npmjs.org/angular/forms
npm http GET http://registry.npmjs.org/angular/http
npm http GET http://registry.npmjs.org/angular/platform-browser
npm http GET http://registry.npmjs.org/angular/platform-browser-dynamic
npm http GET http://registry.npmjs.org/angular/platform-server
npm http GET http://registry.npmjs.org/ionic/storage
npm http GET http://registry.npmjs.org/ionic/app-scripts
npm http GET http://registry.npmjs.org/typescript
npm http 304 http://registry.npmjs.org/sw-toolbox
npm http 304 http://registry.npmjs.org/ionic-angular
npm http 304 http://registry.npmjs.org/rxjs
npm http 304 http://registry.npmjs.org/zone.js
npm http 404 http://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 'io.cordova.myappf8082c'
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:\Users\jonat\OneDrive\documentos\visual studio 2015\Projects\Bcons\Bcons
npm ERR! node -v v0.10.31
npm ERR! npm -v 1.4.9
npm ERR! code E404
npm http 404 http://registry.npmjs.org/angular/core
npm http 404 http://registry.npmjs.org/angular/compiler
npm http 404 http://registry.npmjs.org/angular/compiler-cli
npm http 404 http://registry.npmjs.org/angular/forms
npm http 404 http://registry.npmjs.org/angular/platform-browser-dynamic
npm http 404 http://registry.npmjs.org/angular/platform-server
npm http 404 http://registry.npmjs.org/angular/http
npm http 404 http://registry.npmjs.org/angular/platform-browser
npm http 304 http://registry.npmjs.org/typescript
npm http 404 http://registry.npmjs.org/ionic/storage
npm http 404 http://registry.npmjs.org/ionic/app-scripts
npm

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

未安装的唯一依赖项是:

  • 离子 - 角
  • rxjs
  • SW-工具箱
  • 打字稿
  • zone.js

1 个答案:

答案 0 :(得分:0)

首先尝试更新您的npm和节点。 npm -v 1.4.9已经过时了。 做

npm install -g npm@latest

它可能没有最新的注册表