{"record":{"id":"ed0f08008c16c84c","repo":"dotnet/aspnetcore","slug":"the-package-output-path-was-not-provided","errorCode":null,"errorMessage":"The package output path was not provided.","messagePattern":"The package output path was not provided\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"eng/scripts/npm/pack-workspace.mjs","lineNumber":30,"sourceCode":"const workspacePath = process.argv[3];\n\nconst defaultPackageVersion = process.argv[4];\n\nconst 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') {","sourceCodeStart":12,"sourceCodeEnd":48,"githubUrl":"https://github.com/dotnet/aspnetcore/blob/3600ca084e9c8b5f4174fc5e747f4c52d2100806/eng/scripts/npm/pack-workspace.mjs#L12-L48","documentation":"pack-workspace.mjs requires a package output path as argv[5]; this is the directory where the produced .tgz tarballs are written during --create-packages. If it is missing the script aborts.","triggerScenarios":"Invoking the script with argv[5] (packageOutputPath) missing or empty (pack-workspace.mjs:16,29-31).","commonSituations":"The MSBuild target that drives packing did not pass the artifacts output directory; a refactored build dropped the property; running the script manually without specifying where tarballs go.","solutions":["Pass the output directory for .tgz files as the 5th positional argument.","Confirm the MSBuild property (e.g. $(PackageOutputPath)) is set on the target that invokes the script.","Pre-create the directory before running --create-packages (the script also checks existence there)."],"exampleFix":"// before\nnode pack-workspace.mjs --create-packages ./pkg/package.json 8.0.0\n// after\nmkdir -p artifacts/packages && node pack-workspace.mjs --create-packages ./pkg/package.json 8.0.0 artifacts/packages artifacts/intermediate","handlingStrategy":"validation","validationCode":"const out = process.argv[5];\nif (!out) { console.error('Package output path (argv[5]) required'); process.exit(2); }\nif (action === '--create-packages' && !fs.existsSync(out)) { fs.mkdirSync(out, { recursive: true }); }","typeGuard":"const isDirPath = (s) => typeof s === 'string' && s.length > 0;","tryCatchPattern":null,"preventionTips":["Always pass the package output path (argv[5]).","Pre-create the output directory before --create-packages.","Confirm the MSBuild PackageOutputPath property is set."],"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"}