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

Error when importing "settings" library in npm package

ANSWERED

Hi there! I'm trying to move some of the logic out of my app into an npm package to enable use in other apps. The package is hosted on github and installed with:

 

$ npm install git://github.com/oswalde-p/fitbit-guhrli-core.git --save-dev

 

 However, the build fails with the following message:

 

[18:43:58][error][app] settings is imported by node_modules/fitbit-guhrli-core/companion/index.js, but could not be resolved

 


Is there something else I need to do to `fitbit-guhrli-core` to allow it to be used in other apps?

Thanks 🙂

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

Never mind, I fixed it by removing the root `index.js` from my package and directly importing from the `app/` and `companion/` directories.

View best answer in original post

Best Answer
0 Votes
1 REPLY 1

Never mind, I fixed it by removing the root `index.js` from my package and directly importing from the `app/` and `companion/` directories.

Best Answer
0 Votes