Open
Description
π Search Terms
monorepo, ts7016, build, peer, project builds
π Version & Regression Information
- TypeScript v5.7.3
β― Playground Link
No response
π» Code
packages/sandbox/index.ts (app)
import { createLogger } from "@dmca/utils/logger";
(async function () {
const [logger] = createLogger(undefined, "local");
console.log("done.");
})();
packages/sandbox/package.json
{
"name": "@dmca/sandbox",
"dependencies": {
"@dmca/utils": "workspace:^"
}
}
libs/utils/package.json (library)
{
"name": "@dmca/utils",
"exports": {
"./logger": {
"types": "./dist/logger/index.d.ts",
"default": "./dist/logger/index.js"
},
}
}
libs/utils/src/logger/index.ts
export const createLogger = () => {
...
}
...
π Actual behavior
index.ts.-.dmca-aws.Dev.Container_.DMCA.AWS.@.code-server.-.Visual.Studio.Code.2025-04-23.15-30-32.mp4
I'm using a monorepo via pnpm workspaces with TypeScript 5.7.3. Libraries have an exports field in package.json that point to a compiled version of it. Whenever I recompile the library, all references to it fails with the error Could not find a declaration file for module "@module". path-to-compiled-js implicitly has an any type.
, until I either restart tsserver or delete and re-add the reference. The video shows the error process.
π Expected behavior
I expect tsserver not to fail.
Additional information about the issue
No response