-
• #2
double post :-(
-
• #3
take a look at the specs and all the samples: none use any extension... - no .js or .min.js when loading from local sandbox modules folder. Check the setup of you IDE for the proper discover / lookup / search sequence.
Just use
const ScadaJs = require("scada");
and pick a naming like
const = scadaModule ...
if it behaves like a module ofconst Scada = ...
if it is a constructor / behaves like a class definition. This helps in your app's type safety / robustness. You can also come up with a notation of your own for type oriented suffixes, like...M
or...Mod
for modules. You may find similar as 'best practice' of implementation of ancient interpretative languages / language dialects - like some BASICs - that denoted a String variable by (required) appending of the dollar sign($)
, such aslet name$ =
, orlet count% =
for integers. Even though these times are long gone, the concept is still useful... and can be reflected by providing adequate naming and using upper / lower casing.
I selected a project folder and the modules folder was created there by IDE. I copied my scada.js folder into it.
Require module in my js file.
And I've got a problem, that IDE search this module online instead of local folder.