Trying to fix WebStorm v11.0.4 warnings in JavaScript. Lots of unresolved variable or type
errors for custom types in SailsJS application, such as this one:
I already enabled Node.js in WebStorm. Also, don't know if it is linked, but cannot see "Node Globals" as a library to enable (see pictures below).
Now, I'm clearly not a JavaScript pro. There is a file called DataService.js
in the ./api/services/DataService.js
folder, but even in there, the exact same error occur, and the DataService
type appears to be defined nowhere :/
Any idea, if there is a clean way to get rid of those warnings (ideally making WebStorm aware of those types) or if I just need to ignore them and live with it? Is this a global type defined in Sails or somewhere else?
Edit: One solution that works is in the comments of this question. But I'm not good enough in JS to understand the impact of this solution.
Thanks!
Seems you need to enable Node Core library (as lena also commented),
Within WebStorm:
NOTE: Make sure you do it within 'Settings' and not only in 'Default Settings'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With