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

Yield is a reserved word

Developing for the Fitbit is an increasingly frustrating experience.

 

Now I'm running into the "yield is a reserved word" error at build time (thank god it's not at runtime like most other errors, if you can get it running). Any idea where that comes from? The word Yield isn't even in my code; I am using async/await though (on the companion).

 

The indicated lines also do not have any remotely related code on it.

Best Answer
0 Votes
4 REPLIES 4

There's a bug with the error line numbers which should be resolved soon.

 

If you download the fba file and unzip it, take a look at the companion/index.js file, the line number may match that.

 

If you're still stuck, can you put the project on Github or somewhere?

Best Answer
0 Votes

Thanks! Hope that gets solved soon.

 

It seems that not using Async/await but only using Promises and then() helped but I'm not clear as to whether async/await syntax should be entirely eschewed?

Best Answer
0 Votes

The companion is a webview, so should support async/await, the device only supports ES5.1.

Best Answer
0 Votes

It was most definitely happening on the companion side. Could be something else. I'll continue using promises for now but if I run into it again I'll post here!

Best Answer
0 Votes