{"record":{"id":"d2208db0e263f071","repo":"dotnet/aspnetcore","slug":"the-intermediate-output-path-was-not-provided","errorCode":null,"errorMessage":"The intermediate output path was not provided.","messagePattern":"The intermediate output path was not provided\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"eng/scripts/npm/pack-workspace.mjs","lineNumber":34,"sourceCode":"const packageOutputPath = process.argv[5];\n\nconst intermediateOutputPath = process.argv[6];\n\n// Validate and throw if the arguments are not provided\nif (!workspacePath) {\n  throw new Error('The workspace path was not provided.');\n}\n\nif (!defaultPackageVersion) {\n  throw new Error('The default package version was not provided.');\n}\n\nif (!packageOutputPath) {\n  throw new Error('The package output path was not provided.');\n}\n\nif (!intermediateOutputPath) {\n  throw new Error('The intermediate output path was not provided.');\n}\n\n// Log all the captured process arguments\nconsole.log(`Workspace Path: ${workspacePath}`);\nconsole.log(`Default Package Version: ${defaultPackageVersion}`);\nconsole.log(`Package Output Path: ${packageOutputPath}`);\nconsole.log(`Intermediate Output Path: ${intermediateOutputPath}`);\n\nif (action === '--update-versions') {\n  const [packagesToPack, renames] = applyVersions(defaultPackageVersion, workspacePath);\n  // Write packagesToPack and renames to a file\n  writeJsonSync(resolve(intermediateOutputPath, 'packagesToPack.json'), packagesToPack);\n  writeJsonSync(resolve(intermediateOutputPath, 'renames.json'), renames);\n} else if (action === '--create-packages') {\n  if (!existsSync(packageOutputPath)) {\n    throw new Error(`The package output path ${packageOutputPath} does not exist.`);\n  }\n","sourceCodeStart":16,"sourceCodeEnd":52,"githubUrl":"https://github.com/dotnet/aspnetcore/blob/3600ca084e9c8b5f4174fc5e747f4c52d2100806/eng/scripts/npm/pack-workspace.mjs#L16-L52","documentation":"pack-workspace.mjs requires an intermediate output path as argv[6] where it writes and later reads packagesToPack.json and renames.json used to coordinate the two-phase --update-versions / --create-packages flow. Missing it aborts the script.","triggerScenarios":"Invoking the script with argv[6] (intermediateOutputPath) missing or empty (pack-workspace.mjs:18,33-35).","commonSituations":"The build target omitted the intermediate/obj directory argument; a CI yaml refactor dropped the parameter; the property pointing at $(IntermediateOutputPath) was empty.","solutions":["Pass the intermediate working directory as the 6th positional argument.","Ensure the MSBuild property feeding intermediateOutputPath is set (typically the obj directory).","Run --update-versions and --create-packages with the same intermediate path so the JSON handoff files line up."],"exampleFix":"// before\nnode pack-workspace.mjs --update-versions ./pkg/package.json 8.0.0 artifacts/packages\n// after\nnode pack-workspace.mjs --update-versions ./pkg/package.json 8.0.0 artifacts/packages artifacts/intermediate","handlingStrategy":"validation","validationCode":"if (!process.argv[6]) {\n    console.error('Intermediate output path (argv[6]) required');\n    process.exit(2);\n}","typeGuard":"const isNonEmpty = (s) => typeof s === 'string' && s.length > 0;","tryCatchPattern":null,"preventionTips":["Pass the intermediate output path (argv[6]) consistently to both actions.","Point it at the obj directory of the build.","Keep --update-versions and --create-packages using the same intermediate path."],"tags":["nodejs","npm","build","cli","arguments"],"backgroundTag":null,"analyzedSha":"3600ca084e9c8b5f4174fc5e747f4c52d2100806","analyzedAt":"2026-08-11T16:32:30.678Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}