• Sun 2018.09.09

    Commented on in a separate link but burried by title, so relisted here for more current visibility.

    native IDE v 0.68.6

    From: https://www.espruino.com/Modules

    If you are using a local project folder, the Web IDE will automatically create an empty modules folder inside. Put a module there and you can load it with require("myCustomModule");.
    With default Web IDE configuration, it will look for modules following this order:
    local minified
    online minified
    local normal
    online normal

    Located the default projects file newProject.js and verified the module file was in an adjacent sister folder.

    Ran the app but was greeted with: Module testLED not found

    The console output appears to agree that the modules folder isn't being searched.

    FIRMWARE: Current 1v99, Available 1v99
    Device found (connectionId=1)
    [success] Connected to port COM4
    >>> Connected to port COM4
    loadModule(testLED)
    ERROR: Found module, but search took too long.
    Espruino.Core.Utils.getURL: got HTTP status code 404 for http://www.espruino.com/modules/testLED.min.js
    Espruino.Core.Utils.getURL: got HTTP status code 404 for http://www.espruino.com/modules/testLED.js
    WARNING: [notify_warn] Module testLED not found
    Found a prompt... great!
    Splitting at "reset();\n", delay 250
    loadModule(testLED)
    ERROR: Found module, but search took too long.
    Espruino.Core.Utils.getURL: got HTTP status code 404 for http://www.espruino.com/modules/testLED.min.js
    Espruino.Core.Utils.getURL: got HTTP status code 404 for http://www.espruino.com/modules/testLED.js
    WARNING: [notify_warn] Module testLED not found
    Found a prompt... great!
    Splitting at "reset();\n", delay 250
    

    I also found this reference form Mar 2018 with similar situation and apparent attempt to resolve. Does this need a revisit?

    http://forum.espruino.com/comments/14110348/

    WinXP: how can I require() some locally held modules?

    https://github.com/espruino/EspruinoWebIDE/issues/186

About

Avatar for Robin @Robin started