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

Error when i import every module

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
4 REPLIES 4

Not all modules are supported, but it looks like you don't have `github-from-package` installed?

Best Answer

Will modules that aren't on the list of supported modules definitely not work?

Best Answer
0 Votes

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
0 Votes

Is there any way to check whether a module is supported?

Best Answer
0 Votes