08-15-2021 10:17
08-15-2021 10:17
Does anyone know how to resolve this please?
Answered! Go to the Best Answer.
08-15-2021 15:42
08-15-2021 15:42
I think that what's happening is that Studio doesn't do a very thorough job when a default SDK5/6 project is converted to a SDK 4.3 project.
The breaking changes are described here. That doc assumes you're going from SDK 4.3 to 5; since you're going the opposite direction, those changes need to go the other way.
At a guess, try this:
Don't worry; it gets easier after this!
08-15-2021 10:24
08-15-2021 10:24
Building app for Fitbit Versa
Building companion
Generated an empty chunk: "index"
Error: Compile failed.
Build failed.
Sorry, this is the full error message when hitting run in the watch face app.
08-15-2021 13:34
08-15-2021 13:34
It usually means that an expected source code file didn't have any code in it. If app/index.js and/or companion/index.js is basically empty, try putting something like
console.log('Running!');
in them.
08-15-2021 14:55
08-15-2021 14:55
Thank you, that worked but now its throwing up error 22 and error 2
My widget.gui and index.gui are both are both empty
Apologies this is all mew to me.
08-15-2021 15:00
08-15-2021 15:00
At this stage, you might find it easier by not starting from an empty project. I think that Studio and CLI both provide the option to start with a minimal working project. That would let you study what needs to be where.
08-15-2021 15:13
08-15-2021 15:13
Thanks, i'm using the digital watch face project but it's just not playing ball. I've followed the instructions but no joy. I'll keep trying.
08-15-2021 15:17
08-15-2021 15:17
SDK 4.3, I assume?
08-15-2021 15:21
08-15-2021 15:21
yes on a versa
08-15-2021 15:25
08-15-2021 15:25
Maybe the penny has dropped, for me. Does your Studio (I assume) project contain a 'widget.defs' file?
08-15-2021 15:26
08-15-2021 15:26
yes it does
08-15-2021 15:32
08-15-2021 15:32
<svg>
<defs>
<link rel="stylesheet" href="styles.css" />
<link rel="import" href="/mnt/sysassets/system_widget.defs" />
</defs>
</svg>
08-15-2021 15:42
08-15-2021 15:42
I think that what's happening is that Studio doesn't do a very thorough job when a default SDK5/6 project is converted to a SDK 4.3 project.
The breaking changes are described here. That doc assumes you're going from SDK 4.3 to 5; since you're going the opposite direction, those changes need to go the other way.
At a guess, try this:
Don't worry; it gets easier after this!
08-15-2021 15:47
08-15-2021 15:47
Thank you, that's done the trick
03-27-2022 18:18
03-27-2022 18:18
Thank you Peter, much appreciated 🙂
09-26-2022 13:48
09-26-2022 13:48
Thanks Peter
I also had to edit package.json to remove some build types that got inserted. To do this I changed the name to package.txt made my edits and then names it back to package.json
🙂