gruntjs / grunt

Grunt: The JavaScript Task Runner
http://gruntjs.com/
Other
12.27k stars 1.5k forks source link

npm prune --production causes error when grunt and grunt-cli installed together #1554

Closed majgis closed 7 years ago

majgis commented 7 years ago

https://github.com/npm/npm/issues/13063

-sh-4.1$ npm prune --production
unbuild babel-plugin-array-includes@2.0.3
unbuild eslint-plugin-react@3.16.1
unbuild md5-file@2.0.7
unbuild react-addons-test-utils@15.3.2
unbuild redux-mock-store@1.2.1
unbuild sinon-chai@2.8.0
unbuild babelify@7.3.0
unbuild babel-plugin-transform-object-rest-spread@6.8.0
unbuild chai@3.5.0
unbuild grunt-mocha-test@0.13.2
unbuild nock@7.7.3
unbuild proxyquire@1.7.10
unbuild redux-devtools@3.3.1
unbuild sinon@1.17.6
unbuild babel-register@6.14.0
unbuild grunt-contrib-concat@1.0.1
unbuild grunt-contrib-less@1.4.0
unbuild grunt-eslint@17.3.2
unbuild babel-preset-react@6.11.1
unbuild babel-core@6.14.0
unbuild babel-eslint@7.0.0
unbuild grunt-contrib-watch@1.0.0
unbuild jsdom@9.5.0
unbuild babel-plugin-transform-class-properties@6.11.5
unbuild enzyme@2.4.1
unbuild babel-preset-es2015@6.14.0
unbuild grunt-browserify@5.0.0
unbuild grunt-contrib-uglify@2.0.0
unbuild grunt-targethtml@0.2.6
unbuild concurrently@3.0.0
unbuild mocha@2.5.3
unbuild grunt-cli@1.2.0
unbuild eslint@1.10.3
unbuild grunt@1.0.1
unbuild nodemon@1.9.2
npm ERR! Linux 2.6.32-642.4.2.el6.x86_64
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "prune" "--production"
npm ERR! node v4.5.0
npm ERR! npm  v2.15.9
npm ERR! path /home/test/projects/test-app/node_modules/.bin/grunt
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall unlink

npm ERR! enoent ENOENT: no such file or directory, unlink '/home/test/projects/test-app/node_modules/.bin/grunt'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! Please include the following file with any support request:
npm ERR!     /home/test/projects/test-app/npm-debug.log
-sh-4.1$ npm prune --production
unbuild grunt@1.0.1
majgis commented 7 years ago

The workaround it to either uninstall grunt-cli or execute npm prune --production twice.

vladikoff commented 7 years ago

uninstall grunt-cli

yea remove it , it's already in the grunt package.

majgis commented 7 years ago

Might be good to put this in the README in big bold letters...