我只是按照其中的说明操作: http://karma-runner.github.io/0.12/intro/installation.html
Karma已正确安装。 虽然,我无法安装因果茉莉和karma-chrome-launcher。我实际上有很多关于README的警告:
npm WARN package.json abbrev@1.0.4 No README data
npm WARN package.json ansi@0.2.1 No README data
npm WARN package.json archy@0.0.2 No README data
npm WARN package.json asn1@0.1.11 No README data
...
然后是一些未满足的依赖:
*
npm WARN unmet dependency /usr/lib/node_modules/block-stream requires inherits@'~2.0.0' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency /usr/lib/node_modules/fstream requires inherits@'~2.0.0' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency /usr/lib/node_modules/fstream-ignore requires inherits@'2' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency /usr/lib/node_modules/fstream-npm requires inherits@'2' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency /usr/lib/node_modules/glob requires inherits@'2' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency /usr/lib/node_modules/npmconf requires inherits@'~2.0.0' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency /usr/lib/node_modules/tar requires inherits@'2' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
*
知道哪里可以来自哪里?
答案 0 :(得分:-1)
Follow below steps to setup karma-jasmine environment
• Install nodejs
o Download nodejs suitable setup file from https://nodejs.org/download/ website.
o Install nodejs using setup file
• Installation of Karma and plugins using npm(node package manager)
o Open command prompt
o Traverse to project structure
cd ‘\path of project folder’
(path till folder which is having /src folder in it)
o Install Karma
npm install karma --save-dev
• New folder in project structure will get created named as ‘node_modules’
• If any warnings appear on command prompt ignore them
o Install browser plugins(optional)
npm install karma-jasmine karma-chrome-launcher --save-dev
• If any warnings appear on command prompt ignore them
o Install Karma command line interpreter globally
npm install -g karma-cli
• If any warnings appear on command prompt ignore them