'WebStorm for NodeJS add NPM modules in 'External Libraries'

Is there a way to add the NPM NodeJS External modules so my node project modules appear in 'External Libraries' and are resolved by code completion and navigate?

Thanks



Solution 1:[1]

Yes, besides enabling code completion in Settings (Ctrl + Alt + S) > Languages and Frameworks > Node.js after downloading it via the Settings > Plugins section, You have to actually install the Node.js kind of manually.

First, create a basic package.json file containing all the config info needed to install Node.js,
for more info look here: https://nodejs.dev/learn/the-package-json-guide

After you've done that, simply open up the terminal emulator (Alt + f12) and type in npm install.

As long as you have the package.json file in the same directory, everything should work fine,
and your IDE - webstorm in this case, should add Node's external modules automatically,
to the External libraries > Node.js core section in your project tab.


Cheers.

Solution 2:[2]

on webstorm go to:

  • file
  • settings
  • javascript
  • libraries
  • download or add

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Armado
Solution 2 gokturk