- If you want exact Node.js version, install one in
.nvmrc(if you have nvm, usenvm install). Should not matter for the bug - If you want to use exact NPM version, use
corepack enable. Should not matter for the bug - Install exact package versions:
npm ci
npx tsc
Expected output: successful compilation
Actual output:
node_modules/@azure/functions/src/utils/toolProperties.ts:10:1 - error TS1287: A top-level 'export' modifier cannot be used on value declarations in a CommonJS module when 'verbatimModuleSyntax' is enabled.
10 export class ToolPropertyBuilder implements McpToolProperty {
~~~~~~
node_modules/@azure/functions/src/utils/toolProperties.ts:162:1 - error TS1287: A top-level 'export' modifier cannot be used on value declarations in a CommonJS module when 'verbatimModuleSyntax' is enabled.
162 export const arg = {
~~~~~~
node_modules/@azure/functions/src/utils/toolProperties.ts:225:1 - error TS1287: A top-level 'export' modifier cannot be used on value declarations in a CommonJS module when 'verbatimModuleSyntax' is enabled.
225 export function convertToolProperties(args: Args): McpToolProperty[] {
~~~~~~
node_modules/@azure/functions/src/utils/toolProperties.ts:238:1 - error TS1287: A top-level 'export' modifier cannot be used on value declarations in a CommonJS module when 'verbatimModuleSyntax' is enabled.
238 export function isToolProperties(properties: unknown): properties is Args {
~~~~~~
node_modules/@azure/functions/src/utils/toolProperties.ts:275:1 - error TS1287: A top-level 'export' modifier cannot be used on value declarations in a CommonJS module when 'verbatimModuleSyntax' is enabled.
275 export function normalizeToolProperties(
~~~~~~
Found 5 errors in the same file, starting at: node_modules/@azure/functions/src/utils/toolProperties.ts:10