I was patiently waiting for metronic to release on next, meanwhile i decided to code some pages in a simple react app. Fast forward to today;
I was trying to move my application, so I did setup metronic with next.js following the given commands on the guide and I got this error:
â–² Next.js 14.2.5
- Local: http://localhost:3000
✓ Starting...
✓ Ready in 1918ms
â—‹ Compiling / ...
⨯ ./src/app/globals.css.webpack[javascript/auto]!=!./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[3]!./src/app/globals.css
TypeError: Class constructor KTLayout cannot be invoked without "new"
Import trace for requested module:
./src/app/globals.css.webpack[javascript/auto]!=!./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[3]!./src/app/globals.css
./src/app/globals.css
GET / 500 in 3838ms
⨯ ./src/app/globals.css.webpack[javascript/auto]!=!./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[3]!./src/app/globals.css
TypeError: Class constructor KTLayout cannot be invoked without "new"
Import trace for requested module:
./src/app/globals.css.webpack[javascript/auto]!=!./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[3]!./src/app/globals.css
./src/app/globals.css
GET / 500 in 471ms
I manage to get it work but sidebar collapse is bugged
https://i.imgur.com/Gpu2sTR.png
any clue?
Hi,
Thank you for reaching out to us.
Are you using source code from the latest Metronic v9.0.3?
If you use the source code from the latest Metronic 9 version, ensure you have @import "demos/demo1";
style import in your metronic/css/styles.css
. If you are using the source code from Metronic older versions then you need to add require('./src/metronic/core/plugins/layouts/demo1')
to plugins
array in tailwind.config.js
.
Regards,
Lauris Stepanovs,
Keenthemes Support Team