-
• #2
I'm wondering whether the problem is just that my code isn't being loaded by the IDE when I hit the
Send to Espruino
button. When I press the button, the left panel flickers, but there's no indication that anything is uploaded to the watch. Also, when I open the console in Chrome Developer Tools, I see this stack trace whenever I hitSend to Espruino
:index.js:93100 Uncaught TypeError: Cannot read properties of undefined (reading '0') at nextCh (index.js:93100:15) at Object.getLexer (index.js:93107:5) at getModulesRequired (index.js:98985:35) at loadModules (index.js:99110:20) at Array.<anonymous> (index.js:98949:7) at cb (index.js:92893:15) at Object.callProcessor (index.js:92898:5) at Object.getEspruinoCode (index.js:95560:14) at index.js:100584:30 at Object.ensureConnected (index.js:100846:7)
-
• #3
Does reading through the modules README maybe give you an idea? You probably already have, but just want to make sure we're on the same page.
-
• #4
As above, try changing your search path to
https://banglejs.com/apps/modules|https://www.espruino.com/modules
in the IDE - maybe your browser's stored data got deleted so the IDE went back to default settings?The
Cannot read properties of undefined
error sounds strange though - any chance you could post up your app so I can see if I get that when uploading it from the IDE here? -
• #5
Thanks for all of your help.
I had already studied the modules README carefully and at length. I had also checked my search path. But those were good ideas.
Over night, I got another idea, and it worked: I cleared all of my cookies from
espruino.com
. After that, I was able to use the IDE to store the app without an error in the Chrome console.However, all
Bangle.http
requests failed without even appearing in the web server's logs. Another form of resetting solved that problem: I rebooted the phone and the watch. The app immediately started communicating.Whew! I don't know how many times I'm going to have to learn this lesson: whenever something doesn't work, just turn it off and on again before trying anything else.
I updated all the apps on my watch for the first time in months, and now I'm unable to use the web IDE to load the custom Bangle.js 2 watch face I wrote that has been working fine for over a year. I'm probably missing something obvious, but I haven't been able to figure out the problem after hours of trying. The basic problem is that
require("Layout")
fails withUncaught Error: Module "Layout" not found
. When I look at the IDE's "board information" in Settings (see below), it shows the correct board, i.e.BANGLEJS2
, butMODULES
doesn't includeLayout
. But the documentation still talks aboutLayout
, and that library is used in many examples, so it doesn't appear to have been deprecated. Am I missing something obvious?Thanks very much.
VERSION 2v20
GIT_COMMIT fcc9ba4f1
BOARD BANGLEJS2
RAM 262144
FLASH 1048576
SPIFLASH 8388608
HWVERSION 2
STORAGE 8388608
SERIAL 76b4caad-5ff7556e
CONSOLE Bluetooth
MODULES Flash,Storage,heatshrink,crypto,tensorflow,locale
EXPTR 495068
APP_RAM_BASE 536884832