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: MiniCssExtractPlugin is not a constructor #340

Closed
jaywcjlove opened this issue Jan 16, 2022 · 1 comment
Closed

TypeError: MiniCssExtractPlugin is not a constructor #340

jaywcjlove opened this issue Jan 16, 2022 · 1 comment

Comments

@jaywcjlove
Copy link
Member

jaywcjlove commented Jan 16, 2022

KKT:BUILD:ERROR: TypeError: MiniCssExtractPlugin is not a constructor
    at createWebpackConfig (/home/runner/work/react-code-preview/react-code-preview/node_modules/react-scripts/config/webpack.config.js:664:9)
    at _callee$ (/home/runner/work/react-code-preview/react-code-preview/node_modules/kkt/src/scripts/build.ts:31:29)
    at tryCatch (/home/runner/work/react-code-preview/react-code-preview/node_modules/regenerator-runtime/runtime.js:63:40)
    at Generator.invoke [as _invoke] (/home/runner/work/react-code-preview/react-code-preview/node_modules/regenerator-runtime/runtime.js:294:22)
    at Generator.next (/home/runner/work/react-code-preview/react-code-preview/node_modules/regenerator-runtime/runtime.js:119:21)
    at asyncGeneratorStep (/home/runner/work/react-code-preview/react-code-preview/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
    at _next (/home/runner/work/react-code-preview/react-code-preview/node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)

Upgrade kkt@7.0.4.

Solution 1

npm i mini-css-extract-plugin@2.4.7 -D

Solution 2

For anyone else running into this with an app created via kkt, add this to your package.json and then run yarn installagain.

"resolutions": {
  "mini-css-extract-plugin": "~2.4.7
}

Originally posted by @jaywcjlove in #198 (comment)

jaywcjlove added a commit to uiwjs/react-code-preview that referenced this issue Jan 16, 2022
kktjs/kkt#340
TypeError: MiniCssExtractPlugin is not a constructor
jaywcjlove added a commit to uiwjs/react-code-preview that referenced this issue Jan 16, 2022
kktjs/kkt#340
TypeError: MiniCssExtractPlugin is not a constructor
jaywcjlove added a commit that referenced this issue Jan 17, 2022
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

1 participant