Using IntelliJ for Node JS VM development
We are running a NodeJS platform in which most of our files are executed as strings that are read by a function using the NodeJS VM functionality. IntelliJ shows a ton of errors while editing them since:
- It doesn't know that they run as part of an async funtion and it flags all the async calls as errors.
- for the same reason, it flags all "return" statements as errors
- It doesn't know about global variables used by the files, since they're defined in JSON structures either in the same file or in a "globals.json" file where the script file resides
Is there a way to configure IntelliJ to recognize that environment?
Please sign in to leave a comment.
No, it's not possible - the syntax analyser can't handle 'partial' code; I can only suggests disabling the inspections to avoid the errors