Vague `failed to transpile` error -- `noEmitOnError: true` breaks rpt2
See original GitHub issueWhat happens and why it is wrong
I get the error:
[!] (plugin rpt2) Error: failed to transpile 'packages/kit/src/runtime/navigation/index.ts'
This is almost impossible to debug. Luckily I figured out I can do npx tsc
and get the real error message:
src/runtime/navigation/types.ts:33:9 - error TS2304: Cannot find name 'Route'.
33 route: Route;
~~~~~
Found 1 error.
Environment
Versions
npx: installed 1 in 1.212s
npmPackages:
rollup: ^2.32.0 => 2.32.0
rollup-plugin-typescript2: ^0.29.0 => 0.29.0
typescript: ^4.0.3 => 4.0.3
Steps to reproduce
If you do not have pnpm
then first run npm install -g pnpm
git clone git@github.com:sveltejs/kit.git
cd kit
git reset --hard 2483ae3730a7219814cc654c03b0409a797de2ee
pnpm install
pnpm -r build
After this, you can build just the relevant sub-project by running cd packages/kit
and then npx rollup -c
for faster debugging
Other context
Looks like it’s coming from here: https://github.com/ezolenko/rollup-plugin-typescript2/blob/6fb0e75f5328666dca8ff7b11bc956096351a3eb/src/index.ts#L221
printDiagnostics
right above looks to be being passed an empty array of diagnostics
Issue Analytics
- State:
- Created 3 years ago
- Comments:7
Top Results From Across the Web
When building, isolatedModules is set to true, causing error
In my typescript react-asp.net application (created in Visual Studio 2017), I receive the following error: Option 'noEmitOnError' cannot be ...
Read more >noEmitOnError. Error in Typescript, still the… - Gaurav Dasgupta
If we set noEmitOnError: true in the tsconfig.json file then on compiling my typescript code in case of error the javascript will not...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
#345 has been released in
0.33.0
Actually, the type-only portion of this should be fixed by #345 as this use-case was using
tsconfig
include
globs (duplicating #298). There’s more fixes to come for different situations with type-only files though.