terminal errors when using webpack with sequelize
See original GitHub issueI was working on a project where I needed a quick DB interface, so I hit up npm install sequelize --save
and npm install mysql --save
and then reran my webpack build, only for webpack to rather spectacularly die on this new library:
Simply having var Sequelize = require('sequelize');
in my code triggers this rather weird error, and prevents webpack from actually building all the files.
Issue Analytics
- State:
- Created 8 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Using Sequelize and Webpack - dependency and loader errors
I moved this Sequelize database configuration into my server.js file (that holds my express configuration) and it works well as webpack no ...
Read more >How to fix Unable to resolve sequelize package error
When running any sequelize-cli command from the Terminal, you may encounter an error saying Unable to resolve sequelize package .
Read more >When I Run NPM Run Dev I Got Error: Cannot find module 'del'
Please help me why i got this error when i run this command: NPM RUN DEV. [webpack-cli] Error: ... I use npm install...
Read more >How to use 'sequelize.sync()' without difficulties - Medium
You can see what Sequelize is doing through the log printed on the terminal. const sequelize = new Sequelize( config.database,
Read more >Error [ERR_REQUIRE_ESM]: require() of ES Module not ...
The easiest way to solve the error if using TypeScript is to downgrade the version of the package to one that is built...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The problem is a dynamic require (
this.lib = require(sequelize.config.dialectModulePath || 'mysql');
) which cannot be statically analysed. You could address it with theContextReplacementPlugin
.Issue was closed because of inactivity.
If you think this is still a valid issue, please file a new issue with additional information.