Why appear "Uncaught Error: Module XXX not found" always ? #6079
Replies: 1 comment
-
Posted at 2019-04-20 by @gfwilliams What's the module you're requiring? Espruino's IDE won't pull in modules from NPM, it will only pull in the modules on the Espruino site. http://www.espruino.com/Modules Also, you may be trying to use the module on the left-hand side of the IDE without having uploaded code in the right hand side that uses it? http://www.espruino.com/Troubleshooting#i-get-uncaught-error-module-xyz-not-found- Posted at 2019-04-21 by water Solved, I type the script on left-hand side of the IDE before. How can I save the modules (.js file) on board storage, and require it from board storage directly without internet access ? Posted at 2019-04-22 by @allObjects You can add a SD card w/ adapter and store the module there. The SD card has to be mounted when the code has to run. In order to prevent the loading on upload of your program you pass the module name in a string variable. When doing so, the uploader does not find the pattern with regular expression:
If you want to do that, you can inline the module or stick into the module cache in the code you upload. See Module Development and Module creation at runtime. And I'm sure there are more options... Posted at 2019-04-22 by water I connect SD Card to ESP8266 via SPI, and try to init SD Card by:
but appear "Uncaught Error: Function "connectSDCard" not found!" Thanks. Posted at 2019-04-22 by @allObjects ...could be... since ESP8266 is not only application CPU cycle constraint but also memory wise. In addition to resource constraints, ESP8266 does not have USART, SPI, I2C,... implemented the hardware / appliances way as the STM32 based Espruino boards have, and software-only - bit banging - USART, SPI, I2C,... put an extra stress on the already tight resources. This manifests also in the way of lower / limited baud rate and lesser accuracy in timing. What is the particular reason that you cannot use the IDE's way of uploading modules on upload? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2019-04-20 by water
I use ESPRUINO WEB IDE native Windows 64bit application, but appear "Uncaught Error: Module XXX not found" always when I
except built-in Modules, e.g: DS18B20, DHT11 ... ... , the internet connection is fine, and I already try to Enable Offline mode and
download the Offline data, but not work always, what's the problem ?
Beta Was this translation helpful? Give feedback.
All reactions