twenties: Move setup script from boot file to run at install time ins… - #4271
Open
thyttan wants to merge 3 commits into
Open
twenties: Move setup script from boot file to run at install time ins…#4271thyttan wants to merge 3 commits into
thyttan wants to merge 3 commits into
Conversation
…tead. Thanks @cookesan for the help in https://github.com/orgs/espruino/discussions/7982.
thyttan
commented
Jun 27, 2026
| { "name": "twenties.boot.js", "url": "boot.js" }, | ||
| { "name": "twenties", "url": "lib.js" } | ||
| { "name": "twenties", "url": "lib.js" }, | ||
| { "name": "RAM", "content": "require('twenties').setup();" } |
Collaborator
Author
There was a problem hiding this comment.
I tried doing
{ "name": "RAM", "url": "setup.js" }where setup.js would be
require('twenties').setup()but then it couldn't access the twenties library that was just uploaded with this error
>��Uncaught ReferenceError: "twenties" is not defined
at REPL (:1:9)
require(twenties).setup();;Bluetooth.println("OK")
^
>Uncaught ReferenceError: "twenties" is not defined
at REPL (:1:9)
require(twenties).setup();;Bluetooth.println("OK")
^
>@gfwilliams is that expected?
Collaborator
Author
There was a problem hiding this comment.
OK - I should have tested a bit more. Doing
{ "name": "RAM", "url": "setup.js", "evaluate":true }works.
Member
There was a problem hiding this comment.
It looks like there might have been some quoting error in that code? Eg require(twenties).setup() should have been require('twenties').setup() - so I wonder where along the line that got lost?
added 2 commits
June 28, 2026 00:06
It was: Error: App twenties's RAM has evaluate:true but is not valid JS expression
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…tead.