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

Cannot find module 'body-presence'

ANSWERED

Hey all,

 

I'm just getting started with the Fitbit SDK and making a clock face! 

 

When importing the BodyPresence sensor (via the docs) as such:

import { BodyPresenceSensor } from "body-presence";

My Versa simulator throws this error:

Unhandled Error: Cannot find module 'body-presence'

 

The HeartRateMonitor docs state to use the body-presence module to detect whether the Fitbit is on wrist (https://dev.fitbit.com/build/guides/sensors/heart-rate/#detecting-off-wrist) and I copied the import right from there. Am I missing a step?

 

Any help would be much appreciated!

 

Thanks,

-Alex

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

Nevermind, fixed it. I had my SDK set to v1, and setting it to v2 fixed it. I guess the BPS was only added in v2!

View best answer in original post

Best Answer
0 Votes
1 REPLY 1

Nevermind, fixed it. I had my SDK set to v1, and setting it to v2 fixed it. I guess the BPS was only added in v2!

Best Answer
0 Votes