Hello developers of this project, I have a big request for you. Please do as normal your editor, many people putting global. asking stupid questions… Why am I underlined? And this is annoying, they think that they have an error in the code, or even some claim that you can not use global. Fix it if we set the global.n = require(’…’) and then where we use it, it will be underlined… I hope you will understand and correct this error.
This issue is caused by the code linting used by the Glitch editor, CodeMirror, which unfortunately, does not yet support global variables, and thus, identify them as undefined.
And I don’t think the users are asking stupid questions, because Glitch edit being a code editor, they expect the editor to identify global variables, but only to find an error.
Specifically, it does not support user-defined properties of the global object.
@perssBest You can create a variable via
cost nf = require(…) which should be treated as you would expect. If you declare it on the top level of the source file, it will effectively be global (at least in the context of the source file).