ENOTFOUND包找不到ng-cordova

时间:2016-11-25 17:38:02

标签: cordova bower

帮助!我是Cordova,node,grunt,bower等的新手。

我正在尝试将现有的Cordova应用程序导入Visual Studio 2015.尝试更新依赖项时(右键单击项目资源管理器中的依赖项节点,然后选择"还原软件包")我收到此消息在输出中:

  

ENOTFOUND包找不到ng-cordova

我进入命令提示符并运行:

npm install -g ng-cordova

结果是:

npm WARN deprecated conventional-changelog@0.0.11: Please update conventional-changelog to >1.0.0. If you are running the cli, use conventional-changelog-cli
ng-cordova@0.1.27-alpha C:\Users\myuser\AppData\Roaming\npm\node_modules\ng-cordova
├── fs@0.0.2
├── q@1.4.1
├── conventional-changelog@0.0.11 (event-stream@3.1.7, lodash.assign@2.4.1)
└── gulp-git@1.12.0 (any-shell-escape@0.1.1, require-dir@0.1.0, through2@0.6.5, gulp-util@3.0.7)

这有用吗?

然后我跑了:

bower install

仍然收到消息:

  

ENOTFOUND包找不到ng-cordova

以下是完整输出:

bower                     invalid-meta bower                     invalid-meta The "name" is recommended to be lowercase, can contain digits, dots, dashes
bower font-awesome#~4.3.0   not-cached https://github.com/FortAwesome/Font-Awesome.git#~4.3.0
bower font-awesome#~4.3.0      resolve https://github.com/FortAwesome/Font-Awesome.git#~4.3.0
bower parse-js-sdk#~1.4.0       cached https://github.com/albemuth/parse-js-sdk.git#1.4.2
bower parse-js-sdk#~1.4.0     validate 1.4.2 against https://github.com/albemuth/parse-js-sdk.git#~1.4.0
bower angular#~1.2              cached https://github.com/angular/bower-angular.git#1.2.32
bower angular#~1.2            validate 1.2.32 against https://github.com/angular/bower-angular.git#~1.2
bower bootstrap#~3.2.0          cached https://github.com/twbs/bootstrap.git#3.2.0
bower bootstrap#~3.2.0        validate 3.2.0 against https://github.com/twbs/bootstrap.git#~3.2.0
bower angular-cookies#~1.2      cached https://github.com/angular/bower-angular-cookies.git#1.2.32
bower angular-cookies#~1.2    validate 1.2.32 against https://github.com/angular/bower-angular-cookies.git#~1.2
bower angular-resource#~1.2     cached https://github.com/angular/bower-angular-resource.git#1.2.32
bower angular-resource#~1.2   validate 1.2.32 against https://github.com/angular/bower-angular-resource.git#~1.2
bower angular-mocks#~1.2        cached https://github.com/angular/bower-angular-mocks.git#1.2.32
bower angular-mocks#~1.2      validate 1.2.32 against https://github.com/angular/bower-angular-mocks.git#~1.2
bower angular-animate#~1.2      cached https://github.com/angular/bower-angular-animate.git#1.2.32
bower angular-animate#~1.2    validate 1.2.32 against https://github.com/angular/bower-angular-animate.git#~1.2
bower angular-bootstrap#~0.10.0 cached https://github.com/angular-ui/bootstrap-bower.git#0.10.0
bower angular-bootstrap#~0.10.0         validate 0.10.0 against https://github.com/angular-ui/bootstrap-bower.git#~0.10.0
bower angular-sanitize#~1.2               cached https://github.com/angular/bower-angular-sanitize.git#1.2.32
bower angular-sanitize#~1.2             validate 1.2.32 against https://github.com/angular/bower-angular-sanitize.git#~1.2
bower angular-touch#~1.2                  cached https://github.com/angular/bower-angular-touch.git#1.2.32
bower angular-touch#~1.2                validate 1.2.32 against https://github.com/angular/bower-angular-touch.git#~1.2
bower angular-ui-router#~0.2.10           cached https://github.com/angular-ui/angular-ui-router-bower.git#0.2.18
bower angular-ui-router#~0.2.10         validate 0.2.18 against https://github.com/angular-ui/angular-ui-router-bower.git#~0.2.10
bower moment#~2.10.2                      cached https://github.com/moment/moment.git#2.10.6
bower moment#~2.10.2                    validate 2.10.6 against https://github.com/moment/moment.git#~2.10.2
bower angular-ui-utils#~0.1.1             cached https://github.com/angular-ui/ui-utils.git#0.1.1
bower angular-ui-utils#~0.1.1           validate 0.1.1 against https://github.com/angular-ui/ui-utils.git#~0.1.1
bower font-awesome#~4.3.0               download https://github.com/FortAwesome/Font-Awesome/archive/v4.3.0.tar.gz
bower font-awesome#~4.3.0                extract archive.tar.gz
bower ng-cordova#~0.0.3                **ENOTFOUND Package ng-cordova not found**

然后我尝试安装ngcordova(没有连字符):

bower install ngcordova

输出仍然有:

  

bower ng-cordova#~0.0.3 ENOTFOUND包找不到ng-cordova

非常感谢任何帮助。 谢谢!

1 个答案:

答案 0 :(得分:1)

第一个命令仅回显有关另一个包的警告(不推荐使用的传统更改日志@ 0.0.11),但ng-cordova已通过npm成功安装。在您的第二个命令中,您拼错了凉亭包裹的名称,因为ngCordova如同on their github page所示,在自述文件中'非常顶级。强烈建议阅读自述文件。 (可能是它被称为“读我”的原因)

如果npm无法找到包裹,您将收到类似

的错误消息
$ npm i lkjsadflkjjlksdf

npm ERR! Linux 4.4.0-42-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "i" "lkjsadflkjjlksdf"
npm ERR! node v4.6.2
npm ERR! npm  v2.15.11
npm ERR! code E404

npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/lkjsadflkjjlksdf
npm ERR! 404 
npm ERR! 404 'lkjsadflkjjlksdf' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.