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

Weather API with SDK 4.3 issue

I see several successful implementations of the weather API with SDK 4.3. However, all my attempts to use the API result in: "TypeError: Attempted to assign to readonly property."

 

When I used the CLI instead I get "[error][app] weather is imported by app/index.js, but could not be resolved".

 

The code I'm using is very barebones:

 

weather
  .getWeatherData()
  .then((data) => {
    console.log("weather ok");
  })
  .catch((ex) => {
    console.error(ex);
  });

Best Answer
0 Votes
2 REPLIES 2

I suggest referencing this project: https://github.com/Fitbit/sdk-weather-clock

 

Best Answer

You must put the weather Request into companion. You can use the Messaging API to send the Weather Data to your watch 

Best Answer
0 Votes