我正在尝试编写一些单元测试。我收到关于角度未定义的错误,所以我想我需要将角度 js 文件包含在我的其他 js 文件中......为此,我正在尝试 npm 安装它......
{
"name": "jzAddons",
"description": "A collection of addons for AngularJS",
"version": "0.0.1",
"private": false,
"devDependencies": {
"angularjs": "git://github.com/angular/angular.js.git",
"grunt": "0.4",
"grunt-contrib-jshint": "0.7.2",
"grunt-contrib-stylus": "0.10.0",
"grunt-contrib-uglify": "0.2.7",
"grunt-contrib-clean": "0.5.0",
"grunt-karma": "*",
"karma": "~0.12",
"karma-chrome-launcher": "*",
"karma-jasmine": "*",
"karma-phantomjs-launcher": "*"
}
}
但npm install
失败了:
> npm install
npm WARN package.json jzAddons@0.0.1 No repository field.
npm http GET https://registry.npmjs.org/grunt-contrib-uglify/0.2.7
npm http GET https://registry.npmjs.org/grunt-contrib-jshint/0.7.2
npm http GET https://registry.npmjs.org/grunt-contrib-stylus/0.10.0
npm http GET https://registry.npmjs.org/grunt-contrib-clean/0.5.0
npm http GET https://registry.npmjs.org/grunt-karma
npm http GET https://registry.npmjs.org/grunt
npm http GET https://registry.npmjs.org/karma-chrome-launcher
npm http GET https://registry.npmjs.org/karma-jasmine
npm http GET https://registry.npmjs.org/karma-phantomjs-launcher
npm http GET https://registry.npmjs.org/karma
npm http 304 https://registry.npmjs.org/grunt-contrib-clean/0.5.0
npm http 304 https://registry.npmjs.org/grunt-contrib-stylus/0.10.0
npm http 304 https://registry.npmjs.org/grunt-contrib-uglify/0.2.7
npm http 304 https://registry.npmjs.org/grunt-contrib-jshint/0.7.2
npm http 304 https://registry.npmjs.org/grunt-karma
npm http 304 https://registry.npmjs.org/karma-jasmine
npm http 304 https://registry.npmjs.org/karma-phantomjs-launcher
npm http 304 https://registry.npmjs.org/karma-chrome-launcher
npm http 304 https://registry.npmjs.org/grunt
npm http 304 https://registry.npmjs.org/karma
npm ERR! Error: No version provided
npm ERR! at needVersion (/usr/local/lib/node_modules/npm/lib/cache.js:1238:40)
npm ERR! at /usr/local/lib/node_modules/npm/lib/cache.js:1112:10
npm ERR! at process._tickCallback (node.js:415:13)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-@googlegroups.com>
npm ERR! System Darwin 13.1.0
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/jzaun/Development/jzAddons
npm ERR! node -v v0.10.18
npm ERR! npm -v 1.3.8
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/jzaun/Development/jzAddons/npm-debug.log
npm ERR! not ok code 0
我如何获得角度进行测试?
有什么方法可以使用 grunt 从 bower 安装一些东西而不必制作 bower.json?我真的不想处理 2 个包系统:-/ 除了测试,我不需要 Angular 来做任何事情,而且必须经历所有的圈子似乎很愚蠢......