If you have started programming in Node.js in JetBrains WebStorm 2018, you might have noticed the below warning in Jetbrains Webstorm 2018.
- Unresolved Function or method warning
- Unresolved Variable or Type warning
Configuring JavaScript Libraries
In WebStorm, the library is a file or set of files whose functions and methods are added to WebStorm’s internal data in addition to the functions and methods that WebStorm retrieves from the project code to be edited. By default, its libraries are write-protected within the project.
WebStorm uses libraries only to improve coding assistance (example, code execution, syntax highlighting, navigation and documentation search). Note that the Library is not a way to manage project dependencies.
Configure Node.js Library
The issue can be resolved by configuring the Node.js library
- Enable code assistance for Node.js
- Enable core libraries for Node.js core
- Click OK to save the settings
Go to: File -> Settings -> Languages and Frameworks -> Node.js and NPM
Check the box for Code Assistance for Node.js as shown in the below screenshot.
Go to: File -> Settings -> Languages and Frameworks -> Javascript ->Libraries
Check the box for Node.js core as shown in the below screenshot.
You will see the warning go away from the IDE editor screen as shown below. Now you will see code assistance will also work correctly.
Thanks for visiting my blog!!!