-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vite dev exits without any error message, explanation, or traceback #22
Comments
Hi there! Thanks for providing the logs. It's unlikely that Looking at the output of the info command, it would seem that I have documented this common problem, and I'm planning to add a verification check to prevent silent failures when these packages are missing. Please add About the last comment, using the |
After a bit more looking at the source, it seems the root problem is that Manually running To your comment about verification, I believe running |
Agreed, for verification I'm thinking of checking both the plugin and vite are installed. I'll leave this open as a reminder to fix the installation (it seems the command is succeeding so the yarn fallback is not used, but it's not actually installing the packages), and to add the verification before the dev and build commands. Thanks for the report! |
Sure thing, thanks for working on this! I've gotten tired of all of webpack's complexity and am hoping this can be viable alternative to webpacker! |
It has been for me! Vite's defaults are great, and at the same time it's very easy to configure (TypeScript-enabled config file), and to extend with plugins. Webpack is great too, but it requires a significant amount of configuration and specific knowledge about its internals. Because of that, webpacker attempts to provide an "out of the box" experience, which then makes it really hard to eject from if you want to instead use something like That's why this library is intentionally narrow in scope: simplify Vite.js integration with Ruby, and get out of the way. |
Description 📖
I was attempting to try out vite in a small rails application by following the Installation/Getting Started sections of the README.
bundle exec vite install
worked without issue. Without editing the generated config files at all, I ranbundle exec vite dev
which quickly exited with exit code 1. The only output shown was the general vite command usage as shown below. The same behavior occurs withbin/vite dev
andnpx vite dev
. While the failure itself is clearly problematic, the more immediate issue is that isn't any error logging nor any (documented) command line args to enable more verbosity or change the logging level.I am willing to dive into the vite JS modules to do some debugging and hopefully figure out what is going wrong, but that is difficult to do since
vite_ruby
passes all commands through npx rather than just adding vite to mypackage.json
(which would be my preference, to be honest) and installing them in my local node_modules.It's a very bare bones repository thus far; essentially a fresh vanilla rails 6 install with a few common gems and node modules.
Reproduction 🐞
Not available
Vite Ruby Info
Run
bin/rake vite:info
and provide the output:Logs 📜
If not providing a reproduction:
Output
Run
DEBUG=vite-plugin-ruby:* bin/vite dev
orDEBUG=vite-plugin-ruby:* bin/vite build
and provide the output:The same output is received with
DEBUG=* bin/vite dev
I cancelled the build command after it hung for 12 minutes.
Screenshots 📷
The text was updated successfully, but these errors were encountered: