WinXP: how can I require() some locally held modules? #1152
Replies: 5 comments
-
Posted at 2015-12-17 by @gfwilliams Hi Uli, Due to some security precautions on Chrome, you can't use To do what you want, go to the |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-12-17 by UliMerkel @gordon thanks for the reply. So when I need to work offline with the IDE, I just have to transfer all the modules from your URL to the local modules folder? I am pretty aware that's not the professional way to do, but when experimenting with the barePICO (just to learn javascript on a coding night) there may not be a WIFI everywhere. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-12-17 by @gfwilliams Yes, that should work fine... Otherwise you could set up a local web server, and then you could change the URL under |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-02-23 by stuggiboy
Unfortunately, this does not work when a module requires another module, for example:
In the code above - module 'hello' requires module 'world', which does not seem to work, regardless of where you put 'world' and how you include it (as separate module - under 'modules/world.js', or in a subfolder - like 'modules/hello/world.js'). As already described above, current workaround is to serve modules from a server of your choice:
__ |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-02-26 by @gfwilliams Hmm, that does sound like a bug in the project handling code. I filed an issue on it at espruino/EspruinoWebIDE#186 Any ideas what might be up @jumjum? I think you did that code originally? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2015-12-17 by UliMerkel
I experiment with the single-button-combination-lock example.
But I want to hide the code array in an external file and use it with require:
From the documentation I learned that I have to change the communication settings, so I entered:
file://C:/umerkel-modules
But I got some:
ERROR: SD card must be setup with E.connectSDCard first
WARNING: Module "combination_lock_code_code" not found
So: how can I use require to load some local module?
TIA, Uli
Update: just found where to put it: the MODULES subdirectory on the Project Path.
Beta Was this translation helpful? Give feedback.
All reactions