Hello,
I recently purchased the Metronic V9.2.0 theme and am trying to integrate it with Laravel.
Despite several attempts, I am unable to properly install the theme. I have carefully followed all the steps but keep encountering an error during the build process.
Here’s what I have done so far:
[commonjs--resolver] Missing "./src/index" specifier in "@keenthemes/ktui" package
import "@keenthemes/ktui/src/index";
import "../../node_modules/@keenthemes/ktui/src/index";
[commonjs--resolver] Missing "./src/components/dropdown" specifier in "@keenthemes/ktui" package
import { KTDropdown } from "@keenthemes/ktui/src/components/dropdown";
import { KTDropdown } from "../../../../../node_modules/@keenthemes/ktui/src/components/dropdown";
Hi Dany,
Thanks for the detailed explanation. it really helps.
We’ve recently pushed an update to the @keenthemes/ktui package that resolves the path-related import issues you mentioned (e.g. Missing "./src/index". To get the fixes:
npm upgrade @keenthemes/ktui
rm -rf node_modules/.vite
npm run dev
Hello,
Great, the fix has resolved the compilation issue. Thank you for your quick response !!
However, not everything is working as expected yet:
1 - Page display:
My page doesn't look like it should. Here’s how it appears right now :
<img src="https://i.imgur.com/1j7QGdH.png" />
instead of
<img src="https://i.imgur.com/mddNpZ0.png" />
I am using the index.blade.php files provided on the GitHub repository of Metronic: https://github.com/keenthemes/metronic-tailwind-html-integration/blob/main/metronic-tailwind-laravel/resources/views/index.blade.php
2 - Console issues:
The console shows several errors
<img src="https://i.imgur.com/8YVepyl.png" />
Also, I noticed numerous console.log() messages in the console, apparently caused by a console.log("result:" + e) left in the code (I hope it’s just a forgotten debug line ð
).
Could you help me resolve these new issues? Thank you in advance for your assistance!
Best regards,<img src="" />
OK, foud the problem.
in the file : resources/metronic/css/styles.css
We need to change
@source "../../../node_modules/@keenthemes/ktui/src/";
@import "../../../node_modules/@keenthemes/ktui/styles.css";
Hi Dany
Glad you fixed it.
We will improve the docs to simplify the integration.
Thanks
Also, why I don't have all the tailwind css classes like space-y-6 ? I only got space-y-10 for example :/