{"record":{"id":"66b6979e7d8eda0e","repo":"microsoft/typescript-go","slug":"publishedtypescriptaliaspackagename-does-not-de","errorCode":null,"errorMessage":"${publishedTypeScriptAliasPackageName} does not depend on ${npmPackageName}.","messagePattern":"(.+?) does not depend on (.+?)\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"Herebyfile.mjs","lineNumber":2269,"sourceCode":"\r\n/**\r\n * @param {string} npmPackageName\r\n */\r\nasync function getPublishedPlatformPackageLibDirWorker(npmPackageName) {\r\n    const dest = path.join(builtPublishedPlatformPackages, \"node_modules\", ...npmPackageName.split(\"/\"));\r\n    const lib = path.join(dest, \"lib\");\r\n    if (fs.existsSync(lib)) {\r\n        return lib;\r\n    }\r\n\r\n    await fs.promises.mkdir(dest, { recursive: true });\r\n\r\n    const tarballDestination = path.join(builtPublishedPlatformPackages, \"tarballs\");\r\n    await fs.promises.mkdir(tarballDestination, { recursive: true });\r\n\r\n    const version = getPublishedTypeScriptPackageJson().optionalDependencies[npmPackageName];\r\n    if (!version || typeof version !== \"string\") {\r\n        throw new Error(`${publishedTypeScriptAliasPackageName} does not depend on ${npmPackageName}.`);\r\n    }\r\n\r\n    const lockEntry = getPackageLock().packages[`node_modules/${npmPackageName}`];\r\n    if (!lockEntry) {\r\n        throw new Error(`package-lock.json does not contain ${npmPackageName}; run npm install.`);\r\n    }\r\n    if (lockEntry.version !== version) {\r\n        throw new Error(`package-lock.json has ${npmPackageName}@${lockEntry.version}, but ${publishedTypeScriptAliasPackageName} depends on ${version}.`);\r\n    }\r\n    if (!lockEntry.resolved || typeof lockEntry.resolved !== \"string\") {\r\n        throw new Error(`package-lock.json entry for ${npmPackageName}@${version} does not contain a tarball URL.`);\r\n    }\r\n\r\n    console.log(`Fetching ${npmPackageName}@${version} with npm.`);\r\n    const { stdout } = await $pipe({ cwd: tarballDestination, env: releasePackageEnv })`npm pack --json ${npmPackageName}@${version}`;\r\n    const [packed] = JSON.parse(stdout);\r\n    if (!packed.filename || typeof packed.filename !== \"string\") {\r\n        throw new Error(`npm pack ${npmPackageName}@${version} did not return a filename.`);\r","sourceCodeStart":2251,"sourceCodeEnd":2287,"githubUrl":"https://github.com/microsoft/typescript-go/blob/1bcfa18d79a3be41772223d5c05dfe4480e614ff/Herebyfile.mjs#L2251-L2287","documentation":"getPublishedPlatformPackageLibDir fetches the lib/ directory of a published platform package (e.g. @typescript/native-preview-win32-x64) by reading its version from the installed alias's `optionalDependencies`. If that map has no entry for the requested npmPackageName, there is no version to download and the build cannot assemble the VSIX, so it throws. The names come from the `platforms` table mapped through getPlatforms().","triggerScenarios":"The Herebyfile `platforms` array lists a platform (or a renamed package under publishAsTypescript naming) that the installed `@typescript/bundled-typescript` alias's optionalDependencies does not contain — typically an alias older than the current platforms table, or a package-name mapping change.","commonSituations":"A new platform was added to Herebyfile.mjs but the local alias predates it; the alias install is stale relative to the branch; the published alias for that version genuinely lacks the platform entry.","solutions":["Update the installed alias: `npm install` at repo root so @typescript/bundled-typescript matches the release version whose optionalDependencies include the platform","Inspect `_extension/node_modules/@typescript/bundled-typescript/package.json` optionalDependencies and confirm the exact package name being requested appears there","If the platform is intentionally unsupported for published-package VSIXes, mark it `vsix: false` in the platforms table so it is not requested"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const optional = require(\"@typescript/bundled-typescript/package.json\").optionalDependencies ?? {};\nfor (const { npmPackageName } of getPlatforms()) {\n  if (typeof optional[npmPackageName] !== \"string\") {\n    throw new Error(`Alias does not list ${npmPackageName} — update/reinstall the alias or drop the platform`);\n  }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["When adding a platform to Herebyfile.mjs, verify the alias version you build against lists it","Mark experimental platforms vsix: false until the published alias includes them"],"tags":["npm","packaging","vsix","platform-support"],"backgroundTag":null,"analyzedSha":"1bcfa18d79a3be41772223d5c05dfe4480e614ff","analyzedAt":"2026-08-16T02:12:00.115Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}