microsoft / microsoft/TypeScript

IntelliSense Import Stops Working After One Import

Open
#39,456 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Needs Investigation Rescheduled
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

TS Template added by @mjbvz

TypeScript Version: 3.9.5

Search Terms

  • npm link
  • linux
  • auto import

  • VSCode Version: 1.46.1
  • OS Version: Linux x64 5.3.0-61-generic snap

Steps to Reproduce:

I created a stripped down repo: https://github.com/shcca/vscode

  1. npm install
  2. cd packages/cli
  3. npm link ../core
  4. packages/core/test.ts and enter/save:
export const helloWorld1 = () => {}
  1. packages/cli/deploy.ts and add at the top:
import { helloWorld1 } from 'core'
  1. packages/cli/deploy.ts, within the handler function, add/save:
helloWorld1()
  1. packages/core/test.ts, add/save:
export const helloWorld2 = () => {}
  1. packages/core/deploy.ts, under helloWorld1(), enter helloWorld2().

IntelliSense doesn't pick up on helloWorld2(). The only way to get it work is to restart VSCode, but then helloWorld3() wouldn't work. This is something that broke recently because I've been working in this project structure for a while with no issues.

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue using the linked shcca/vscode repository and the listed npm link steps, then inspect the TypeScript IntelliSense or language-service path involved in updating linked exports. Done means newly added exports such as helloWorld2 are discovered without restarting VS Code, with the behavior verified using the reproduction steps.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.