Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

[Ubuntu] npm permissions

Are you using any Debian based linux machine ?

      - If you say Yes,  you might face the permission issue with NPM.

Issue is every time I run npm command it's getting EACCESS error.
It means I have to run the command as a super user mode, but I don't like that.

             sudo npm install [module name]

I have been facing this issue from couple of days.

Finally, I decided to fix this issue.

Let's see how did I fix the issue.
  There are couple of ways to fix this issue:

  1.     Change the permission to npm's default directory.
  2.     Change npm's default directory to another directory.
  3.     Install node with a package manager that takes care of this for you.