VS Code doesn't update valid exports in TS+Lerna monorepo ('x has no exported member y')

Viewed 327

I'm using VS Code with Typescript, and when I change what a module exports, its consumers take a while to 'see' the new export.

Simple example:

./packages/pkg1/pkg1.ts
export function fn() { ... }
packages/pkg2/package.json
  "dependencies": {
    "@app/pkg1": "^0.1.0",
packages/pkg2/pkg2.ts
import { fn } from '@app/pkg1'

When I write a new export I see this when I attempt to consume it:

Module '"../../node_modules/@app/pkg1"' has no exported member 'fn'.

This is strictly a VS Code / Intellisense problem - the code runs fine, and after a while VS Code will catch up.

I am new to using monorepos / Lerna and I suspect that's part of the problem, am I setting this up wrong?

0 Answers
Related