-
I recall that I used to run To be clear, the docs do not suggest that it should work without a sub-platform. I'm really just trying to figure out if I'm losing my mind. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
It should work with no subplatform. I use that often for projects that run on a bare ESP8266. I just did builds of helloworld and pins/button ( It looks like this line is the problem: If you change that to The reason that it works when you built for esp/nodemcu is that imports "pins/digital" (for the button and LED) which allows modGPIO.h to be included.
|
Beta Was this translation helpful? Give feedback.
-
That all makes perfect sense, and that change fixed the problem for Now for my code to work, I need to add Is there a better, recommended way? |
Beta Was this translation helpful? Give feedback.
-
@dtex – Thanks for confirming that fixes it for you too. We'll push that change up so no one else stumbles over it. There was a change in Moddable SDK 4.0 (August of this year) to remove
It was a mistake that it was included, as that is intended to be included once by the project rather than every module and app. In part, that is to allow it to be easily replaced in projects with other requirements. I agree that it is a little odd that the manifst_base is in examples. It is historical at this point, as it started there with the intention of just being an example. But... everything uses it now. We could move it. That raises the question about where it belongs. It isn't a module so $MODDABLE/modules doesn't obviously seem correct, but maybe? It could go in $MODDABLE/modules/base/,manifest.json. manifest_net could go in $MODDABLE/modules/network/manifest.json.
Right. I wouldn't recommend doing that, especially if you want portability, as it will be some work to set up and then maintain as the code base evolves. |
Beta Was this translation helpful? Give feedback.
It should work with no subplatform. I use that often for projects that run on a bare ESP8266. I just did builds of helloworld and pins/button (
mcconfig -d -m -p esp
) and there was no build problem. But.... io/digital/button failed as you describe. So, the problem seems to be in the ECMA-419 IO manifests. I changed the ESP8266 manifest (very) recently, specifically for digital, as part of an ongoing effort to clean-up the manifests.It looks like this line is the problem:
moddable/modules/io/manifests/esp/manifest.json
Line 15 in c2d0b35
If you change that to
"$(MODULES)/pins/digital/esp/modGPIO"
(remove the ".c") it should work. At…