Comments (12)
Where are you having the problem with the IDE? As a Chrome Web App?
Google is switching off the Web Apps very soon now, so it doesn't make sense to maintain them - but I will at some soon point be adding some support to the Online IDE - now the Web APIs have moved on enough that it should all be possible from espruino.com/ide
In the mean time, you can:
- Copy the modules to the board's local storage
- Host the modules on GitHub or even a local HTTP server and reference them by URL
from espruinowebide.
The problem occures in the Web App as well as in the online IDE.
If i use the http workaround, would i then import the modules like that require('http://localhost/module1')
?
from espruinowebide.
The problem occures in the Web App as well as in the online IDE.
Yes, I'm not sure how that happened but the online IDE shouldn't really have had projects
in it as that has never worked (the API isn't available on the web)
If i use the http workaround, would i then import the modules like that require('http://localhost/module1') ?
Yes, that should work - or potentially you may need to have a local https server
from espruinowebide.
This also happens to me on the web IDE. This is quite confusing at first given that the "project tour" button also does not work. I will take a look at porting the legacy chrome app functionality to the new Filesystem API.
from espruinowebide.
Thanks! For now I've just removed the option from settings.
It'd be great if you could look at that though - but if I recall the projects code was a bit hard for me to understand :)
from espruinowebide.
How did you open developer tools? (I can't tell if it's a bug or setting, which is why I haven't opened a separate issue yet) Also, how can I get a file in the IDE to be a module? Without this option, I can't think of any workarounds
from espruinowebide.
Where are you running the IDE from? https://www.espruino.com/ide/ ? As above, that version (the recommended one) doesn't support the project plugin yet because all the APIs for file access have changed.
If you want to develop a module now, you have two options:
- Save the module direct to the device - just have the module file open in the IDE, click the arrow next to the 'upload' button, choose
Storage
, then whatever you want to call your module egmymodule
as the filename. Now when you upload it'll upload that module. In your main file, just userequire("mymodule")
and you're sorted - host it on a local webserver (or GitHub) and link from there
Did you see in the documentation somewhere that suggested using the Project plugin? If so let me know and I can update it to be clearer
from espruinowebide.
@gfwilliams I'm trying to run it natively on Linux in order to use that feature, but can't use it or even open developer tools. I also tried to upload it to the emulator under that storage name, but regardless of it claiming it was in the emulator's storage, I can't import it.
from espruinowebide.
Ahh - ok, it's been a while since anyone tried to run a native version so I don't think you'll have much success. And the 'projects' feature was specific to Chrome Apps (https://chromewebstore.google.com/detail/espruino-web-ide/bleoifhkdalbjfbobjackfdifdneehpo) which Google discontinued.
The IDE may come up with an orange warning about the module not being there when uploading the code, but the code itself will find it and work
from espruinowebide.
Thank you, that's working for me
from espruinowebide.
Related Issues (20)
- Error in Screenshot Links in Readme File HOT 1
- Can't change UI theme HOT 3
- Time out with large StorageFile HOT 1
- getPorts disabled on timeout HOT 3
- Using Monaco editor instead of Codemirror HOT 4
- Add nullish coalescing support to WebIDE HOT 3
- Decode JS interprets string contents as tokens HOT 1
- "The state of the DFU process does not allow this operation" HOT 1
- Ctrl+u makes an undo before upload HOT 4
- Feature request: type to find files in storage HOT 1
- Not all of file name is visible under "Send to Espruino" icon HOT 2
- SlowWrite for espruino.com/ide/relay HOT 3
- Emulator chokes
- [BUG] Setting Vim keymap doesn't work HOT 1
- Editor: Undo in Emacs keymap can cause data loss HOT 9
- Save/load local file from code editor corrupts non-ASCII characters HOT 6
- E.compiledC() subtle change HOT 2
- !!! Web IDE bricking v2 devices with "Firmware update" button HOT 6
- Numeric separators result in error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from espruinowebide.