Skip to content

Project References Regression starting in Nightly 3.9.0-dev.20200313 #37406

@warrenfalk

Description

@warrenfalk

Project References do not appear be honored in tsserver starting in Nightly 3.9.0-dev.20200313. This results in an error in Visual Studio code when importing from 'some-pkg/dist/file' when that file has not yet been built.

TypeScript Version: 3.9.0-dev.20200313 and later

Search Terms:

references tsserver

Code

Minimal reproduction project attached. repro.zip

This seems to be an issue with tsserver, and so I can only reproduce it in Visual Studio Code (not with tsc -b).

The error is a regression starting in version 3.9.0-dev.20200313. There was no error in 3.9.0-dev.20200312 and previous.

To reproduce, use attached repro.zip, here are simple instructions and the screenshot of the result.

unzip repro.zip
cd repro-ts-bug
yarn install
code .
code src1/one.ts

See issue in 3.9.0-dev.20200313:
image

This should work because of a project reference to src2/tsconfig.json from src1/tsconfig.json, and it does work in the previous build of typescript.


You can see this is a regression. Installing the previous version and reloading the window demonstrates no error.

yarn add typescript@3.9.0-dev.20200312

And reload window. No issue in 3.9.0-dev-20200312

image

Expected behavior:

No error, as in second screenshot

Actual behavior:

Error:

Cannot find module '../dist2/two' or its corresponding type declarations.

Playground Link:
Unable to demonstrate project reference issues with playground (as far as I know)

Related Issues:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs More InfoThe issue still hasn't been fully clarified

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions