• The error that shows up on occasion in other projects but here it's persistant

    ERROR: SD card must be setup with E.connectSDCard first
    The error occasionally occurs when other modules are required, but usually clears on a 2nd or third send to Espruino.

    The code is an example from @allObjects

    var creds = require("credsXYZ.js");
    //var creds={ id: "XYZ", ssid: "Mine", pw: "123456", ip: "..." };
    console.log(creds);
    
    /* credsXYZ.js */
    //exports = { id: "XYZ", ssid: "Mine", pw: "123456", ip: "..." }; 
    
    var creds1={ id: "XYZ", ssid: "Mine", pw: "123456", ip: "..." };
    console.log("creds1= ");
    console.log(creds1);
    

    The credsXYZ.js module in the sandbox

    /* credsXYZ.js */
    exports = { id: "XYZ", ssid: "Mine", pw: "123456", ip: "..." }; 
    

    The output

     1v92 Copyright 2016 G.Williams
    >ERROR: SD card must be setup with E.connectSDCard first
    WARNING: Module "credsXYZ.js" not found
    undefined
    creds1=
    {
      "id": "XYZ",
      "ssid": "Mine",
      "pw": "123456",
      "ip": "..."
     }
    =undefined
    > 
    
About