-
-
Notifications
You must be signed in to change notification settings - Fork 432
Sapper swallows Rollup warnings #1221
Comments
So I've spent ~45 minutes looking around to figure out why this is happening. Here's (probably) the most relevant source to reference: https://github.com/sveltejs/sapper/blob/master/src/core/create_compilers/RollupResult.ts#L29 (That Right now, Sapper (or the Rollup build process, not really sure how to differentiate them here) is "crashing" (or exiting on purpose) because it encountered the A really mediocre (because it introduces console I/O where none was before I think) and quick fix is to add these lines right after the linked line: for (const warning of compiler.warnings) {
console.warn(warning.message);
} This provides the expected output. Maybe these are each involved project's best responses?:
(I would also recommend that if you only need TypeScript to start from the leaner template, but in both cases it's a way better idea to use them as bases (i.e. a known working starting point) and replace their contents one-by-one to recreate your pre-existing project) |
Thanks so much for digging into this @babichjacob ! I think the Fixing this in Sapper (your option 1) definitely sounds like the best course of action to me. |
It looks like rollup handles different warnings differently. Some it spits out immediately and others it batches and prints at the end: There's so much code here I wonder if it actually makes sense to try to copy it all into Sapper or to just execute the actual |
Rollup flushes the warnings before it exits when it encounters an error. I've updated #1236 to do the same |
Fixed in 0.27.14. |
Describe the bug
Sapper seems to be swallowing Rollup warnings.
It looks to me like Rollup prints warnings by default unless you include
--silent
: https://rollupjs.org/guide/en/#--silentTo Reproduce
Simply run
npm run build
on the following project:https://github.com/benmccann/sapper-swallows-rollup-warnings
Actual behavior
Expected behavior
Information about your Sapper Installation:
See https://github.com/benmccann/sapper-swallows-rollup-warnings/blob/master/package.json
Severity
This bug is pure evil. This was so very frustrating and it took me many hours pulling my hair out to deal with Rollup issues as a result. It makes all other Rollup issues 10x worse.
Additional context
I ran into this trying to copy pieces of @babichjacob starter project babichjacob/sapper-firebase-typescript-graphql-tailwindcss-actions-template. I think it's upset at me because I setup TypeScript and haven't added any actual
.ts
files yet. Now that I've seen the warning I imagine it should be pretty easy to fix the actual issue I'm running into.The text was updated successfully, but these errors were encountered: