diff options
Diffstat (limited to 'pkgs/build-support/node/fetch-yarn-deps/fixup.js')
-rwxr-xr-x | pkgs/build-support/node/fetch-yarn-deps/fixup.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pkgs/build-support/node/fetch-yarn-deps/fixup.js b/pkgs/build-support/node/fetch-yarn-deps/fixup.js index 732e569aba7bd..a359cd58a916e 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")) { |