Skip to content

Vague failed to transpile error -- noEmitOnError: true breaks rpt2 #254

Closed
@benmccann

Description

@benmccann

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 [email protected]: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:

this.error(red(`failed to transpile '${id}'`));

printDiagnostics right above looks to be being passed an empty array of diagnostics

Metadata

Metadata

Assignees

Labels

kind: bugSomething isn't working properlyproblem: removed issue templateOP removed the issue template without good causeproblem: staleIssue has not been responded to in some timetopic: TS Compiler API DocsRelated to the severely lacking TS Compiler API Docstopic: type-only / emit-less importsRelated to importing type-only files that will not be emitted

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions