I\'m using WebStorm 7 for Firefox Add-on SDK development.
WebStorm shows a warning: \"Unresolved function or method\" for require()
.
I want to g
Another solution that helped me a lot is to update all libs in "Node.js and NPM". You need just mark all libs and click blue arrow - 'update'
Working with Intellj 2016, Angular2, and Typescript... the only thing that worked for me was to get the Typescript Definitions for NodeJS
Get node.d.ts from DefinitelyTyped on GitHub
Or just run:
npm install @types/node --save-dev
Then in tsconfig.json, include
"types": [
"node"
]
Ok, Here I have seen a lot of answers already given, I want to add some more that are fixed unresolved function/method/variable warning.
That is resolved "unresolved function or method for 'require' and some other warning"
Go -> Preferences-> Languages & Frameworks -> Node.js and NPM, then checkmark the "Coding assistance for Node.js"
If you still see this type of warning, unresolved variable or something like that, you can manually disable these warnings by followings.
Go -> Preferences-> Editor-> Inspections-> JavaScript-> General.
and you will find a list and just unchecked what warning you want to disable and then apply.
On WebStorm 2020.1
WebStorm -> Preferences -> Languages & Frameworks -> Node.js and NPM -> Check Coding assistance for Node.js -> Apply
For WebStorm 2019.3 File > Preferences or Settings > Languages & Frameworks > Node.js and NPM -> Enable Coding assitance for NodeJs
Note that the additional packages that you want to use are included.
Webstorm 11 and 2016.2.3
Enable Node.js Core library
in Webstorm settings.