• I think I fixed it!

    Reading other threads, learned about dump().

    >dump()
    // Code saved with E.setBootCode
    var WIFI_NAME = "XXXXXX";
    var WIFI_PASS = "XXXXXX";
    var MQTT_HOST = "192.168.1.145";
    if (typeof __non_webpack_require__ == 'undefined') {
      var __non_webpack_require__ = require;
    }
    var mqtt = __non_webpack_require__("MQTT");
    var wifi = __non_webpack_require__("EspruinoWiFi");­
    var client = mqtt.create(MQTT_HOST);
    client.on('connected', function() {
      client.subscribe("root/branch");
    });
    client.on('publish', function(pub) {
      console.log("topic: "+pub.topic);
      console.log("message: "+pub.message);
    });
    wifi.connect(WIFI_NAME, { password: WIFI_PASS }, function(err) {
      if (err) {
        console.log("Connection error: "+err);
        return;
      }
      console.log("Connected!");
      client.connect();
    });
    =undefined
    

    That's my project code! And a clue! // Code saved with E.setBootCode.

    Let's try this then...

    >E.setBootCode('')
    Erasing Flash...
    Writing...
    Compressed 114368 bytes to 8
    Checking...
    Done!
    =undefined
    >dump()
    =undefined
    > 
    

    Hooray! Right?

    >var wifi = require('EspruinoWiFi')
    ERROR: SD card must be setup with E.connectSDCard first
    WARNING: Module "EspruinoWiFi" not found
    =undefined
    >
    

    fml

About