Skip to content

"Cannot find module" when switching from tsc to tsgo #1376

Open
@JakobJingleheimer

Description

@JakobJingleheimer

Reproduction: https://github.com/JakobJingleheimer/tsgo-specifier-resolution-failure

Setup:

cd ./package/foo
npm ci

Works:

npx tsc

Doesn't work:

npx tsgo

Error:

src/main.ts:1:21 - error TS2307: Cannot find module 'helpers/add.ts' or its corresponding type declarations.

1 import { add } from 'helpers/add.ts';

Extra info:

This was encountered in a next.js app, and the repro should be sufficiently representative of the original code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions