• Not sure if you can help, but I get an error running a custom js module from the sandbox/modules folder and I've been scratching my head for hours working out why. Particularly when it worked using a previous version of Espruino.

    I'm using a

    require('testingModule')
    

    command to load the testingModule.js file and it loads fine, however when it executes a function in that module I get the following error:

    With module minification on:

    Uncaught Error: Function "initSymbol" not found! at line 1 col 3
    m.initSymbol();m.initSymbol();m.initSymbolIterator();m.initS...
    in function "makeIterator" called from line 1 col 105 ...var
    d="",k=m.makeIterator(e),f=k.next();!f.done;f=k.next())d...

    With module minification off:

    Uncaught ReferenceError: "$jscomp" is not defined at line 1 col 150
    ...(var $jscomp$iter$0=$jscomp.makeIterator(data),$jscomp$key$x...
    in function called from system

    The function uses an AT command to connect the module to the server using TCP.

    I know there are no issues with the function, because when I include it in the build (/libs/js), it works and executes that function without any errors.

    What is really odd is that there is no "initSymbol", "makeIterator" or "$jscomp" inside my code at all. Not in this module or any other application code that I've written.

    This same sandbox functionality was working when I was using an older version of Espruino.

About

Avatar for Nadnerb @Nadnerb started