简体   繁体   English

如何解决npm WARN package.json ...没有README数据

[英]How to solve npm WARN package.json … No README data

When I run the following command 当我运行以下命令

npm install

I get the following errors: 我收到以下错误:

npm WARN package.json karma-chrome-launcher@0.1.4 No README data
npm WARN package.json karma-coffee-preprocessor@0.2.1 No README data
npm WARN package.json karma-phantomjs-launcher@0.1.4 No README data
npm WARN unmet dependency /myproj/node_modules/grunt requires lodash@'~0.9.2' but will load
npm WARN unmet dependency /myproj/node_modules/lodash
npm WARN unmet dependency which is version 2.4.1
npm WARN unmet dependency /myproj/node_modules/grunt-usemin requires lodash@'~1.0.1' but will load
npm WARN unmet dependency /myproj/node_modules/lodash
npm WARN unmet dependency which is version 2.4.1
grunt-build-control@0.1.3 node_modules/grunt-build-control
└── shelljs@0.2.6

What do they mean and how do I resolve them? 它们是什么意思,我该如何解决它们?

The README.md is provided by all of the above projects. README.md由上述所有项目提供。

So it is an error on your side. 所以这是你的错误。 It could very well be that you have saved as dependency, if so you need to change your package.json, but we don't do stuff manually, let npm handle it: 很可能你已经保存为依赖,如果是这样你需要更改你的package.json,但是我们不手动做东西,让npm处理它:

Remove packages from project dependencies 从项目依赖项中删除包

npm remove karma-chrome-launcher karma-firefox-launcher karma-cofee-preprocessor karma-phantomjs-launcher --save

Add packages from project devDependecies 从项目devDependecies添加包

Then install as dev dependency as descirbed on the project pages with 然后在项目页面上安装as dev依赖项作为descirbed

npm install karma-chrome-launcher karma-firefox-launcher karma-cofee-preprocessor karma-phantomjs-launcher --save-dev

As mentioned in comments above, these warnings: 如上面的评论所述,这些警告:

npm WARN package.json karma-chrome-launcher@0.1.4 No README data
npm WARN package.json karma-coffee-preprocessor@0.2.1 No README data
npm WARN package.json karma-phantomjs-launcher@0.1.4 No README data

are telling you that the maintainer(s) of karma-chrome-launcher, karma-coffee-preprocessor, karma-phantomjs-launcher have not supplied README.md files for their projects. 告诉你karma-chrome-launcher,karma-coffee-preprocessor,karma-phantomjs-launcher的维护者没有为他们的项目提供README.md文件。

To solve the problem, you would need to find the package on github and submit a pull request to provide README.md, which the maintainers would probably be happy to accept. 要解决这个问题,你需要在github上找到包并提交一个pull请求来提供README.md,维护者可能会乐意接受。 ;-) ;-)

EDIT: 2015-03-26 编辑:2015-03-26

$ npm pack karma-chrome-launcher@0.1.4 $ tar tzf karma-chrome-launcher-0.1.4.tgz package/package.json package/LICENSE package/index.js

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM