> ## Content Index
> Fetch the complete content index at: https://www.bagz.fr/llms.txt
> Use this file to discover other available public pages before exploring further.

# NPM - Warning "root" does not have permission to access the dev dir
- URL: https://www.bagz.fr/npm-warning-root-does-not-have-permission-to-access-the-dev-dir/
- Published: 2015-05-15T08:08:46.000Z
- Updated: 2015-05-15T08:08:46.000Z
- Author: bgazui
- Tags: Linux, #Migrated-1790668826633, #wp, #wp-post, #Import 2026-09-29 08:00

If you want to install some packages using npm and you are getting this kind of error "*Warning "root" does not have permission to access the dev dir*", that means that system is trying to compile some native libraries with a wrong user and so lead to an unability to gain access on certain directories.

To fix this, just use this command instead (in this example, I'm installing '*sails*'):

sudo npm install --unsafe-perm --verbose -g sails

It should do the trick ;)