I use Ubuntu and install Node.js via APT. The global modules go into /usr when installed this way. As per the official NPM website, I correct my command line global module permissions using one of their recommended methods:
Because my modules go into /usr, I opt for option #2, where I choose a different spot to store the global modules, where I do have permission. This fixes the command line "npm install -g" but breaks WebStorm's ability to see them. During the New Project dialog, I can't use create-react-app or express for example.
I looked for an area in Settings to set my new global module location but I couldn't find one.