Friday, February 1, 2019

install node modules globally in debian 9

Installing node modules globally in debian 9 The unix way, your user need to be part of staff group

educacion@family:~/src/docker17_puppeteer$ fgrep educacion /etc/group
staff:x:50:educacion
ssh:x:113:educacion
educacion:x:1000:

Now you have clean access to /usr/local, because you are part of staff group, it's the unix way ( try to not use sudo, not been part of sudo )

educacion@family:~/src/docker17_puppeteer$ npm set prefix /usr/local

educacion@family:~/src/docker17_puppeteer$ npm install -g jshint
/usr/local/bin/jshint -> /usr/local/lib/node_modules/jshint/bin/jshint
+ jshint@2.9.7

No comments: