mickhansen / dataloader-sequelize

Batching and simplification of Sequelize with facebook/dataloader
MIT License
284 stars 58 forks source link

Error: Cannot find module 'bluebird' #123

Closed wilk closed 3 years ago

wilk commented 3 years ago

Hi, I've installed dataloader-sequelize@2.3.1 as a dependency of my project but after running the npm prune --production command to remove the devDeps I get the following error:

➜  myproject git:(main) node dist/index.js
internal/modules/cjs/loader.js:888
  throw err;
  ^

Error: Cannot find module 'bluebird'
Require stack:
- /Users/wilk/Projects/myproject/node_modules/dataloader-sequelize/lib/index.js

Then, if I install bluebird as a dependency of the project, it works fine. Shouldn't be defined inside dataloader-sequelize itself?

mickhansen commented 3 years ago

bluebird used to ship with sequelize i think. the bluebird dependency should probably be removed from this library, node.js promises are just fine now.

wilk commented 3 years ago

Yep, you're right. I created a PR for that: https://github.com/mickhansen/dataloader-sequelize/pull/124