Where to install so all users can access?
Issue #79
resolved
Wondering where I need to install NPM packages so that ALL users can get to them? Or maybe it’s just where to put my custom scripts?
My PATH setup in /home/xxxxxx/.profile:
I need to make use of PM2 in general and then express and aes-js in my script, call it encrypt.js
The script gets called via httpPostClob() and works for me when I place it in /home/xxxxxx/node_modules, but another user doesn’t seem to hit the script.
My PATH:
PATH=/QOpenSys/pkgs/lib/nodejs10/bin:/QOpenSys/pkgs:/QOpenSys/pkgs/bin:$PATH
export PATH
Here are the global installs:
Directory . . . . : /QOpenSys/pkgs/lib/nodejs10/lib/node_modules
Opt Object link Type Attribute Text
express DIR
npm DIR
pm2 DIR
My local installs which need to be accessible by all:
Directory . . . . : /home/xxxxxx/node_modules
Opt Object link Type Attribute Text
aes-js DIR
Comments (2)
-
-
- changed status to resolved
- Log in to comment
Here’s the docs for where Node finds various folders: https://docs.npmjs.com/files/folders
You’ll want to install globally using the
-g
option. Refer to the npm docs: https://docs.npmjs.com/cli/install