Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't load AT module from sandbox #116

Closed
SpenceKonde opened this issue Apr 29, 2015 · 2 comments
Closed

Can't load AT module from sandbox #116

SpenceKonde opened this issue Apr 29, 2015 · 2 comments

Comments

@SpenceKonde
Copy link

While trying to investigate this issue http://forum.espruino.com/conversations/266416/ I decided I wanted to verify that any line handlers were being called. So I saved AT.js, modified it to uncomment those lines, and put it in my espruino sandbox modules directory.

Now, when I try to send, an extra message regarding minification shows up, but the AT module is not sent to the Espruino, so the first time it tried to communicate with the ESP8266 it barfs:


ERROR: SD card must be setup with E.connectSDCard first
WARNING: Module "AT" not found
=undefined
Uncaught Error: Field or method "connect" does not already exist, and can't create it on undefined
 at line 1 col 22
{h.at=d=require("AT").connect(a);require("NetworkJS").create...
                      ^

Removing the AT module from the espruino sandbox, and restarting the IDE restores normal functionality. But it is still impossible to do work on the AT module on your local machine!

:-(

@gfwilliams
Copy link
Member

Hmm - thanks!

I bet this happens to any module referenced from another module that's in the sandbox. Usually some effort goes into handling these recursive requires, but I bet that doesn't happen in the case of the sandbox stuff!

A quick hack would be to put require("AT") in the head of the editor window of the Web IDE.

@gfwilliams
Copy link
Member

Fixed this a while back - it was a regression in project.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants