question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

terminal errors when using webpack with sequelize

See original GitHub issue

I 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:

screenshot 28

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:closed
  • Created 8 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
sokracommented, Jun 15, 2015

The problem is a dynamic require (this.lib = require(sequelize.config.dialectModulePath || 'mysql');) which cannot be statically analysed. You could address it with the ContextReplacementPlugin.

0reactions
webpack-botcommented, Aug 26, 2017

Issue was closed because of inactivity.

If you think this is still a valid issue, please file a new issue with additional information.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found