jefffairson / handlebars-mix

Quick setup for Handlebars & Laravel mix to speep up simple HTML pages development
MIT License
0 stars 0 forks source link

When I run Cannot find module mix-manifest.json is displayed #1

Open sameerast opened 3 years ago

sameerast commented 3 years ago

The watch command to be changed to npm run watch

not

npm watch

and when run watch command

ERROR in C:/xampp/htdocs/handlebar/src/index.hbs: Cannot find module 'C:\xampp\htdocs\handlebar\public\mix-manifest.json' Require stack:

  • C:\xampp\htdocs\handlebar\webpack.mix.js
  • C:\xampp\htdocs\handlebar\node_modules\laravel-mix\setup\webpack.config.js
  • C:\xampp\htdocs\handlebar\node_modules\webpack-cli\lib\webpack-cli.js
  • C:\xampp\htdocs\handlebar\node_modules\webpack-cli\lib\bootstrap.js
  • C:\xampp\htdocs\handlebar\node_modules\webpack-cli\bin\cli.js
  • C:\xampp\htdocs\handlebar\node_modules\webpack\bin\webpack.js Error: Cannot find module 'C:\xampp\htdocs\handlebar\public\mix-manifest.json'

is displayed.

jefffairson commented 3 years ago

Hello,

Thanks for your interest, the documentation is updated.
For the manifest error, I'm working on it. It will throw this error only the first time because the public folder does not exists. But there is a more tricky issue, the HBars render comes before the .version() laravel mix function, so the manifest is everytime the older one which is not pertinent.

I will try to inject the tag directly with webpack.
Stay tuned !

sameerast commented 3 years ago

Thank you for the fix, next thing I observed is,

<!DOCTYPE html>

  | <html lang="en">   | <head>   | <meta charset="UTF-8">   | <meta http-equiv="X-UA-Compatible" content="IE=edge">   | <meta name="viewport" content="width=device-width, initial-scale=1.0">   | <title>This is the page title...</title>   | <link rel="stylesheet" href="">   | </head>   | <body><script id="__bs_script__">//<![CDATA[   | document.write("<script async src='/browser-sync/browser-sync-client.js?v=2.26.14'><\/script>".replace("HOST", location.hostname));   | //]]></script>   |     | <div class="container mx-auto">   | <h1>It Works !!!!</h1>   | <h2>Here is a subtitle...</h2>   | </div> <h2>In Subfolder...</h2>   | <script src=""></script>   | </body>   | </html>

we have missed the stylesheet and javascript code.