Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

type resolution does not pick up type packages that are installed in parent directories #351

Open
@despairblue

Description

@despairblue

I'm using javascript-typescript-langserver in atom via ide-typescript.

The module resolution does not seem to pick up types that are installed in parent directories. This happens usually in monorepos when common dependencies get hoisted to the top level's node_module folder.

I made a repro repo. The file imports debug, but debug ist installed to directories further up the dir tree:

.
├── node_modules
│   ├── .yarn-integrity
│   ├── @types
│   │   ├── debug
│   │   │   ├── LICENSE
│   │   │   ├── README.md
│   │   │   ├── index.d.ts                 <-- Definition 
│   │   │   └── package.json
│   │   └── node
│   │       ├── LICENSE
│   │       ├── README.md
│   │       ├── index.d.ts
│   │       ├── inspector.d.ts
│   │       └── package.json
│   ├── debug
│   │   ├── .coveralls.yml
│   │   ├── .eslintrc
│   │   ├── .npmignore
│   │   ├── .travis.yml
│   │   ├── CHANGELOG.md
│   │   ├── LICENSE
│   │   ├── Makefile
│   │   ├── README.md
│   │   ├── component.json
│   │   ├── karma.conf.js
│   │   ├── node.js
│   │   ├── package.json
│   │   └── src
│   │       ├── browser.js
│   │       ├── debug.js
│   │       ├── index.js
│   │       └── node.js
│   └── ms
│       ├── index.js
│       ├── license.md
│       ├── package.json
│       └── readme.md
├── package.json
├── packages
│   └── main
│       ├── node_modules
│       │   ├── .bin
│       │   ├── .yarn-integrity
│       │   └── typescript
│       ├── package.json
│       ├── src
│       │   ├── test.js
│       │   └── test.ts                   <-- importing dependency
│       ├── tsconfig.json
│       ├── yarn-error.log
│       └── yarn.lock
└── yarn.lock

Using tsc to commpile it works find: npm run build.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions