Issue extended from this [https://community.fitbit.com/t5/SDK-Development/Import-external-module/m-p/4178893#M11671]
I'm still using the sdk-cli to use the module but when i try to import a module it return me the same error ( Cannot find module '{module name}'
t.default at sim-file:/bootstrap:696,15)
What can i do resolve this?
The module that i'm using was installed with the command npx create-fitbit-app <project-name> [https://dev.fitbit.com/build/guides/command-line-interface/]
I create a repo of my code to resolve the problem and show the code [https://github.com/marcs7/TestCodeFitBitApp]
edit:
Using ES6 format (import from) it retruns this error:
code: UNRESOLVED_IMPORT
watchFiles: path file
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! test@0.1.0 build: `fitbit-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the test@0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Build failed with code: 1
Best Answer
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
I think that will not work, to avoid any issue I’m using fetch api and pass data through rest api, when possible. I’m thinking that I will switch to a self made device to avoid the restrictions to this device (Fitbit ionic)
Best Answer