Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: webpack.NormalModuleReplacementPlugin is not a constructor #71

Open
philohelp opened this issue Dec 10, 2023 · 3 comments
Open

Comments

@philohelp
Copy link

Happened when updating to strapi v4.15.5

Maybe related to this
https://stackoverflow.com/questions/68106588/typeerror-webpack-defineplugin-is-not-a-constructor

@DespertaWeb
Copy link

Yep! Just as @philohelp referenced above, do this:

remove your webpack as param and require it:

const webpack = require("webpack");

@MakotoPD
Copy link

@philohelp or just remove this code

config.plugins.push(new webpack.NormalModuleReplacementPlugin(
  /^tippy\.js$/,
  'tippy.js/dist/tippy-bundle.umd.min.js'
))

from webpack.config.js and now will work..

@joaoprcosta
Copy link

Yep! Just as @philohelp referenced above, do this:

remove your webpack as param and require it:

const webpack = require("webpack");

After doing this it returns another error:
"Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants