question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Vague `failed to transpile` error -- `noEmitOnError: true` breaks rpt2

See original GitHub issue

What 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:closed
  • Created 3 years ago
  • Comments:7

github_iconTop GitHub Comments

2reactions
agilgur5commented, Aug 23, 2022

#345 has been released in 0.33.0

0reactions
agilgur5commented, Jun 28, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found