diff --git a/pkgs/build-support/node/fetch-yarn-deps/fixup.js b/pkgs/build-support/node/fetch-yarn-deps/fixup.js index 732e569aba7b..a359cd58a916 100755 --- a/pkgs/build-support/node/fetch-yarn-deps/fixup.js +++ b/pkgs/build-support/node/fetch-yarn-deps/fixup.js @@ -12,6 +12,15 @@ const fixupYarnLock = async (lockContents, verbose) => { const fixedData = Object.fromEntries( Object.entries(lockData.object) .map(([dep, pkg]) => { + if (pkg.resolved === undefined) { + console.warn(`no resolved URL for package ${dep}`) + var maybeFile = dep.split("@", 2)[1] + if (maybeFile.startsWith("file:")) { + console.log(`Rewriting URL for local file dependency ${dep}`) + pkg.resolved = maybeFile + } + return [dep, pkg] + } const [ url, hash ] = pkg.resolved.split("#", 2) if (hash || url.startsWith("https://codeload.github.com")) {