Skip to content

Can not find global types when the globa types are installed in a subdirectory #35336

@b1zzu

Description

@b1zzu
  • VSCode Version: 1.40.1
  • OS Version: Fedora 31 - Linux 5.3.11

Steps to Reproduce:

  1. Create a new project that looks like this:

    examples/
    foo/
      node_modules
        @types/
          jest/
      test/
        bar.test.ts
      jest.config.js
      tsconfig.json # this is extending the parent one tsconfig
      package.json
    node_modules/
    tsconfig.json
    package.json
    
  2. Open the project in vscode

  3. vscode will show errors like this:

    image

    in bar.test.ts

    but if I cd into the foo example and I run the tests
    npm test I will not have any typescript error

    also if I remove extends from the tsconfig.json the error
    will disappear

Is also possible to reproduce this issue by using this project: https://github.com/aerogear/graphql-testx

Does this issue occur when all extensions are disabled?: Yes

Metadata

Metadata

Assignees

Labels

Needs More InfoThe issue still hasn't been fully clarified

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions