1

Every time I use:

var bla = require('./directory/bla.js')

All global functions starts to be "unresolved function or method".

Any ideas?

Felipe Oriani
  • 37,948
  • 19
  • 131
  • 194
Delai
  • 11
  • 1
  • So your IDE is giving you errors, but does the code work ? – adeneo Apr 22 '15 at 22:10
  • 2
    http://stackoverflow.com/questions/20136714/how-can-i-fix-webstorm-warning-unresolved-function-for-require-firefox-a – adeneo Apr 22 '15 at 22:11
  • Do you have an example of how you declare your functions? – tadman Apr 22 '15 at 22:44
  • how do you define your globals? WebStorm indeed doesn't resolve functions defined in other files in Node.js projects unless they are available through require/added to Node.js global namespace – lena Apr 28 '15 at 13:50

1 Answers1

0

The simplest way is to add require as a global at the top of your JavaScript file.

/*global
    setBorderlessEvents
*/
Timothy Gonzalez
  • 1,802
  • 21
  • 18