-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Improper import in route does not throw but builds nothing #5413
Comments
Spend about two hours on this issue, but found way that can help someone debug this faster: just run In my case it was Hopefully this would be resolved as much as possible. For sveltekit dev team and volunteers: I was upgrading from 357 to 367 and this bug was likely introduced in #5332 upd: this is literally the hell if your CI/CD fails because of this but local builds are passing and everything builds fine. |
@ZerdoX-x In my situation that was not helpful because the import error was in some long forgotton playground file. I think the most helpful way to find errors in your code is to call
|
@kuechlerm Yep. So I guess the most reliable way to check why build fails is to downgrade |
Fixed. Thanks for tracking this down @gtm-nayan |
Just a heads-up that I caught this issue a while back and was directed to file on Vite's tracker: #5382 I assume that this was a SvelteKit specific issue and not a Vite issue? In which case I don't need to make a Vite Issue? |
Yeah this was a SvelteKit specific issue. No need to open an issue in Vite. |
Describe the bug
When a page (a .svelte-file in the src/routes directory) has a broken import:
I run
npm run build
.No errors are thrown, no warnings are given and the site doesnt build.
Expected behaviour would be one of:
Reproduction
https://github.com/iverks/sveltekit_import_bug
npm install
npm run build
- nothing gets built, but no errorsThen you can comment out the import in
index.svelte
, and it builds just fineLogs
System Info
Severity
serious, but I can work around it
Additional Information
About severity: I guess it could be considered "annoying", but its terrible DX and was almost impossible to debug.
Tested with adapter-node and adapter-static.
This is using the latest package.json, vite.config.js, svelte.config.js setup supplied by
npm create svelte app-name
The text was updated successfully, but these errors were encountered: