Using Sandbox modules folder is unstable

Posted on
  • When compiling the code, it sometimes says that certain modules cannot be found. These are modules that I created and put in the sandbox/modules dir.

    If I push the same code a few times, it seems to compile the modules correctly on the 2nd or 3rd attempt.

    For the record this is with 9 small modules (sub 20 lines), using v1.99 because I cannot get wifi connection to work on >v2

  • Tue 2019.07.16

    @espftw are you in need of instructions to run modules within the same code file as an interim means to get the code written, or is the posting just an FYI?

    What OS PC type and version please.

    When it fails, would you please upload the output of the WebIDE console error output.
    WebIDE >> Settings >> Console

    'it seems to compile the modules correctly on the 2nd or 3rd attempt'

    How about the next or subsequent days using those same unchanged code modules?

    I am adding the following as an observation. As I have much more testing to do before I add my additional comments, please don't take this as a complaint.

    Six months ago, I had the same issue, but on a Windows 10 PC and then using a Pico. After much discussion and exhaustive testing, we found that placing WebIDE projects within the C:\Users\<username>\Documents\<projectna­me>   folder was problematic. After a month of exhaustive testing, I determined that placing in the drive root C:\<projectname> solved the issue then: (or so I thought)­325378/   #16

    I did observe several issues as is described since then. Problem not solved.

    A month ago, a failed Windows update, (yes as did others, I got hit with the June 2019 Windows update debacle) corrupted the registry and in addition failed to re-boot. System Restore also failed, as did a manual cut-n-paste registry hack attempt. Using the OEM repair disk, along with bootable USB drives, allowed me to recover the data after purchasing a 2T backpack drive, but booting from Windows was to be no more. Yup, you guessed it, I bit the bullet and did a clean install.

    Finally up and running after another two weeks of app installs (one of the reasons I wasn't active ;-) in the forums) endless data xcopy, verification and now back at it. Why do I tell you this, you ask?

    Using virtually a new PC, fresh install of Windows10, new registry and Espruino WebIDE, with next to nothing else on the system, tried another attempt at coding a module, in a projects folder at the drive root as I had always done, but this time with a WiFi. And to my surprise, the same error as is pointed out in #1. So, I realize that we now have at least one other that is willing to detail the event. This is why I ask of the PC OS version detail. Is this a common denominator? We have different microcontrollers.

    I've given up on local module development, and run the code inline to build and prove out.

  • @espftw, it is good practice do develop module inline, then put it thru google closure compiler and then put both .js and .min.js into the modules folder... The IDE has multiple options how to find which modules and where first and also the option to minify code on upload. If a module has an error the minification for sure the upload makes finally fail. Take a look at conversation about Module Development. Honing out issues inline - but already in the structure of a module - makes debugging a lot easier. Modules can be uploaded as source or as functi0ns... as @Gordon points out.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

Using Sandbox modules folder is unstable

Posted by Avatar for espftw @espftw