Context
#673 enabled biome's useImportExtensions lint rule to enforce .js suffixes on relative imports in packages/core. This prevents ESM runtime crashes (ERR_MODULE_NOT_FOUND) when a developer forgets the extension.
However, the ideal fix is switching moduleResolution from bundler to nodenext in packages/core/tsconfig.json, so tsc itself rejects missing extensions at compile time rather than relying on a lint rule.
Problem
@modelcontextprotocol/ext-apps@1.3.2 ships .d.ts files with extensionless specifiers:
// dist/src/app.d.ts
export { PostMessageTransport } from "./message-transport";
export * from "./types";
Under nodenext, TypeScript can't resolve these, causing errors like:
TS2305: Module '"@modelcontextprotocol/ext-apps"' has no exported member 'McpUiResourceMeta'
TS2460: Module declares 'McpUiHostContext' locally, but it is exported as 'PostMessageTransport'
Next steps
- File an issue or PR upstream on
modelcontextprotocol/ext-apps to add .js extensions in their declaration files
- Once fixed upstream, switch
packages/core/tsconfig.json to module: "nodenext" / moduleResolution: "nodenext" and remove the biome project domain workaround
Context
#673 enabled biome's
useImportExtensionslint rule to enforce.jssuffixes on relative imports inpackages/core. This prevents ESM runtime crashes (ERR_MODULE_NOT_FOUND) when a developer forgets the extension.However, the ideal fix is switching
moduleResolutionfrombundlertonodenextinpackages/core/tsconfig.json, so tsc itself rejects missing extensions at compile time rather than relying on a lint rule.Problem
@modelcontextprotocol/ext-apps@1.3.2ships.d.tsfiles with extensionless specifiers:Under
nodenext, TypeScript can't resolve these, causing errors like:TS2305: Module '"@modelcontextprotocol/ext-apps"' has no exported member 'McpUiResourceMeta'TS2460: Module declares 'McpUiHostContext' locally, but it is exported as 'PostMessageTransport'Next steps
modelcontextprotocol/ext-appsto add.jsextensions in their declaration filespackages/core/tsconfig.jsontomodule: "nodenext"/moduleResolution: "nodenext"and remove the biomeprojectdomain workaround