Get 2024 Templates Mega Bundle!19 Bootstrap HTML, Vue & React Templates + 3 Vector Sets
Get for 99$

Metronic Laravel v8.2.0 - Folder Structure


Hallo Faizal,

I apologize for all the work, but I hope it also helps you to solve the problems in this new version. I am testing all the time and I noticed an basic error in the folder structure (in my opinion).
After the first Compiling the public/assets folder contains a folder named resources: public\assets\resources\_keenthemes\src\js\custom.

In the basic public\assets\js folder there are only two files, the scripts.bundle.js and the widgets.bundle.js - in my opinion the custom folder should be placed here automatically? I will try a hard-coding but this can not be a permanent solution.

I wish you all the best

Uwe


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (8)


in webpack.mix.js, replace line 65 with:
var output = `public/assets/${file.replace('resources/_keenthemes/src/', '')}`;



Thanks for the answer, this solves the problem.
I'm installing with laravel 10 and this problem is still present.

In the first compilation it works because the "custom" folder is already included with the original files, even before running "npm run dev" the folder is already there. After the user sends the project to git, the assets folder is ignored, so it goes without the "public/assets/js/custom" directory. In the next compilation, the folder will no longer be generated. The "Xhevat Ziberi" solution works, but it would be nice if it was a permanent solution for metronic.



Hi Uwe,

Just to clarify, after running the "npm run dev" command, the assets are compiling correctly, but the public/assets/js/custom folder is not being generated, is that correct?

We will thoroughly look into this issue and work on a solution to fix it.

Thanks



Hi,

Could you let me know if the problem occurs only after you build the assets with "npm run dev"?

Do you have access to our GitHub? We checked that the folder exists in the zip folder by default.
https://github.com/KeenthemesHub/Metronic/tree/master/laravel/laravel_demo1/starterkit/public/assets/js/custom

Thanks



Hallo Faizal,

I reinstalled Metronic Laravel v8.2.0 again, before i compile all the assets (npm run dev) the folder structure is ok (as on github).

After using --npm run dev-- the public/assets folder contains the whole resources folder (with all files).

The custom folder is missing in the public\assets\js folder.

Thanks a lot

Uwe



Hi Uwe,

Thank you for bringing this to our attention, and I apologize for any inconvenience you've experienced. In the latest version (v8.2.0) of Metronic Laravel, the 'public/assets/js/custom' folder should be automatically generated and included during the asset compilation process.

When you run 'npm run dev', the source files from 'resources/_keenthemes/src/js/custom' should be compiled and output to the 'public/assets/js/custom' folder. This folder is essential for storing custom JavaScript files specific to the particular pages.

If you are not seeing the 'public/assets/js/custom' folder after running 'npm run dev', there might be an issue with the asset compilation process. Please ensure that you have followed all the installation steps correctly and that there are no errors or warnings during the compilation.

If the issue persists, please let us know, and we'll be happy to assist you further in resolving it.

Best regards.



Hallo Faizal,

I completely reinstalled Metronic Laravel v8.2.0 and all components and followed the instructions point by point, the result was the same: I could not login or sign in because the js-files was not found. (error 404)

After the first compiling i found the folder resources\_keenthemes\src\js\custom in the public/assets folder (shold not be there!).

In the public\assets\js folder there are only two files, the scripts.bundle.js and the widgets.bundle.js. (There is no custom folder!).

There must be an error in the pipe of webpack.mix.js that completely copies the resources\_keenthemes\src\js\custom folder to public/assets.

I am shure this causes all the js-errors in laravel, because when i copy the custom folder manualy - the login works (but with many 404 Errors).

Thanks for your help

Uwe



The same issue i also facing.
custom js is not comming


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(