grunt-contrib-build' is not in the npm registr

2019-05-06 23:32发布

问题:

I'm getting below error when I try to install npm install grunt-contrib-build --save-dev on my Windows 7 system using command prompt.

C:\css-base>npm install grunt-contrib-build --save-dev
npm WARN package.json my-project@0.1.0 No README.md file found!
npm http GET https://registry.npmjs.org/grunt-contrib-build
npm http 404 https://registry.npmjs.org/grunt-contrib-build
npm ERR! 404 'grunt-contrib-build' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it
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.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "grunt-contrib-build" "--save
-dev"
npm ERR! cwd C:\css-base
npm ERR! node -v v0.10.3
npm ERR! npm -v 1.2.17
npm ERR! code E404
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\css-base\npm-debug.log
npm ERR! not ok code 0

回答1:

If anyone finds this while trying to install this plugin:

grunt-contrib-build

is now called

grunt-usemin

However the tasks in the new plugin might not be supported, please check https://github.com/yeoman/grunt-usemin/issues/3 for more information.



回答2:

Have you tried reading the error message?

npm ERR! 404 'grunt-contrib-build' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it