Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialDan Emery
13,841 PointsGrunt Configuration Issue
Does anyone know why I get this error when trying to install packages through npm?
npm ERR! Windows_NT 6.3.9600 npm ERR! argv "c:\Program Files\nodejs\node.exe" "c:\Program Files\nodejs\ node_modules\npm\bin\npm-cli.js" "cache" "clean" npm ERR! node v0.12.0 npm ERR! npm v2.5.1 npm ERR! path C:\Users\Deano\AppData\Roaming\npm-cache npm ERR! code EPERM npm ERR! errno -4048
npm ERR! Error: EPERM, rmdir 'C:\Users\Deano\AppData\Roaming\npm-cache' npm ERR! at Error (native) npm ERR! { [Error: EPERM, rmdir 'C:\Users\Deano\AppData\Roaming\npm-cache'] npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR! path: 'C:\Users\Deano\AppData\Roaming\npm-cache' } npm ERR! npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request: npm ERR! C:\xampp\htdocs\goldenagesongbird\wp-content\themes\goldenagesongbi rd\npm-debug.log /c/Program Files/nodejs/npm: line 14: 5784 Signal 112 (core dumped ) "$basedir/node.exe" "$basedir/node_modules/npm/bin/npm-cli.js" "$@"
Dan@DEAN /c/xampp/htdocs/goldenagesongbird/wp-content/themes/goldenagesongbird ( master) $ npm install -g grunt-cli npm ERR! Windows_NT 6.3.9600 npm ERR! argv "c:\Program Files\nodejs\node.exe" "c:\Program Files\nodejs\ node_modules\npm\bin\npm-cli.js" "install" "-g" "grunt-cli" npm ERR! node v0.12.0 npm ERR! npm v2.5.1 npm ERR! path C:\Program Files (x86)\Git\Users\Deano\npm-global\grunt.cmd npm ERR! code EPERM npm ERR! errno -4048
npm ERR! Error: EPERM, unlink 'C:\Program Files (x86)\Git\Users\Deano\npm-global \grunt.cmd' npm ERR! at Error (native) npm ERR! { [Error: EPERM, unlink 'C:\Program Files (x86)\Git\Users\Deano\npm-gl obal\grunt.cmd'] npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR! path: 'C:\Program Files (x86)\Git\Users\Deano\npm-global\grunt. cmd' } npm ERR! npm ERR! Please try running this command again as root/Administrator. npm ERR! error rolling back Error: EPERM, unlink 'C:\Program Files (x86)\Git\Use rs\Deano\npm-global\grunt.cmd' npm ERR! error rolling back at Error (native) npm ERR! error rolling back { [Error: EPERM, unlink 'C:\Program Files (x86)\Git \Users\Deano\npm-global\grunt.cmd'] npm ERR! error rolling back errno: -4048, npm ERR! error rolling back code: 'EPERM', npm ERR! error rolling back path: 'C:\Program Files (x86)\Git\Users\Deano\ \npm-global\grunt.cmd' }
npm ERR! Please include the following file with any support request: npm ERR! C:\xampp\htdocs\goldenagesongbird\wp-content\themes\goldenagesongbi rd\npm-debug.log /c/Program Files/nodejs/npm: line 14: 3656 Signal 112 (core dumped ) "$basedir/node.exe" "$basedir/node_modules/npm/bin/npm-cli.js" "$@"
-I have the latest version of node, -I have updated npm
I suspect it might be a permissions error as running as administrator Any ideas?
2 Answers
Chris Shaw
26,676 PointsHi Dan,
It's typical now days for grunt/gems packages to require root permission when installing specific packages as they sometimes need to exist in the system executable bin which is protected by root, you can get around this by running the npm
command as sudo
like the below example.
sudo npm install grunt-contrib-copy --save-dev
Hope that helps.
Dan Emery
13,841 PointsIt is a permissions error but sudo doesnt seem to work. Is it because I'm using windows 8? Do you know of an alternative work around? Thanks!