• Yes, I've done everything what was in the manual.

    I've made it simpler. I run Apache. Configured it for CORS. Copied modules into /var/www/html/mark/BangleApps/modules/
    Added this to IDE Modules path http://localhost/mark/BangleApps/modulesĀ­/
    Now IDE accepts require, but still saying AT6558 not defined.

    >require("AT6558");
    =function (a) { ... }
    >gnss = new AT6558("TST");
    Uncaught ReferenceError: "AT6558" is not defined
     at line 1 col 12
    gnss = new AT6558("TST");
    

    To fix the above issue I've added to my module.

    exports.connect = function(id) {
        return new AT6558(id);
    };
    

    and use it from program following way

    gnss = require("AT6558").connect("TST");
    

    Adding to this, it required also to set default expiration to 0 in apache settings. Otherwise Web IDE keeps using old file from browser cache despite it was already modified.

  • The reason it didn't work without the connect function (the not defined error) is you weren't assigning the result of the require anywhere. You wanted

    var AT6558 = require("AT6558");
    
About

Avatar for myownself @myownself started