ElMassimo / vite_ruby

āš”ļø Vite.js in Ruby, bringing joy to your JavaScript experience
https://vite-ruby.netlify.app/
MIT License
1.32k stars 122 forks source link

Vite runs on development but fails on production #388

Closed rockwellll closed 1 year ago

rockwellll commented 1 year ago

Description šŸ“–

Hi, hoping you're having a good day. I've setup vite-rails for my application. Everything runs okay in development, however, when pushing the app to production. The build fails and i get this error,

ViteRuby::MissingEntrypointError
Vite Ruby can't find entrypoints/application.js in public/vite/manifest.json or public/vite/manifest-assets.json.

Possible causes:
  - The file path is incorrect.
  - The file is not in the entrypoints directory.
  - Some files are outside the sourceCodeDir, and have not been added to watchAdditionalPaths.
  - You have not run `bin/vite dev` to start Vite, or the dev server is not reachable.
  - "autoBuild" is set to `false` in your config/vite.json for this environment.

Visit the Troubleshooting guide for more information:
  https://vite-ruby.netlify.app/guide/troubleshooting.html#troubleshooting

I have read everywhere on the documentation but could not solve this. Anything would really help.

Thank you