Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Generated an empty chunk: "index"

ANSWERED

Does anyone know how to resolve this please?

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

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:

  • Rename widget.defs to widgets.gui
  • In widgets.gui, change system_widget.defs to widgets_common.gui
  • Rename index.view to index.gui

Don't worry; it gets easier after this!

Peter McLennan
Gondwana Software

View best answer in original post

Best Answer
14 REPLIES 14

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.

Best Answer
0 Votes

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.

Peter McLennan
Gondwana Software
Best Answer

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.

Best Answer

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.

Peter McLennan
Gondwana Software
Best Answer
0 Votes

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.

 

Best Answer
0 Votes

SDK 4.3, I assume?

Peter McLennan
Gondwana Software
Best Answer
0 Votes

yes on a versa 

Best Answer
0 Votes

Maybe the penny has dropped, for me. Does your Studio (I assume) project contain a 'widget.defs' file?

Peter McLennan
Gondwana Software
Best Answer
0 Votes

yes it does

Best Answer
0 Votes

<svg>
<defs>
<link rel="stylesheet" href="styles.css" />
<link rel="import" href="/mnt/sysassets/system_widget.defs" />
</defs>
</svg>

Best Answer

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:

  • Rename widget.defs to widgets.gui
  • In widgets.gui, change system_widget.defs to widgets_common.gui
  • Rename index.view to index.gui

Don't worry; it gets easier after this!

Peter McLennan
Gondwana Software
Best Answer

Thank you, that's done the trick

 

Best Answer

Thank you Peter, much appreciated 🙂

Best Answer

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

 

🙂

Best Answer