Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Yarn 2 PnP #22

Open
willersonsp opened this issue Aug 17, 2022 · 0 comments
Open

Support for Yarn 2 PnP #22

willersonsp opened this issue Aug 17, 2022 · 0 comments

Comments

@willersonsp
Copy link

willersonsp commented Aug 17, 2022

Hi, can you update this fork code with current version of esbuild to support Yarn 2 PnP, our project uses zip-and-ship-it, that uses this library as dependency.

we are in a process to optimize our build and are upgrading to yarn 2 PnP, but this library doesnt have support for PnP yet.

Yarn 2 with nodeLinker: 'node-modules' works, but if changed to nodeLinker: 'pnp' it doesnt work's anymore.

Logs:

This file contains the result of Yarn building a package (@netlify/esbuild@npm:0.14.25)

Script name: postinstall

node:internal/errors:841
const err = new Error(message);
^

Error: Command failed: node src\core.yarn\unplugged@netlify-esbuild-npm-0.14.25-0402108100\node_modules@netlify\esbuild\bin\esbuild --version
src\core.pnp.cjs:32727

  Error.captureStackTrace(firstError);

        ^

Error: @netlify/esbuild tried to access esbuild, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

Required package: esbuild

Required by: @netlify/esbuild@npm:0.14.25 (via src\core.yarn\unplugged@netlify-esbuild-npm-0.14.25-0402108100\node_modules@netlify\esbuild\bin)

Require stack:

  • src\core.yarn\unplugged@netlify-esbuild-npm-0.14.25-0402108100\node_modules@netlify\esbuild\bin\esbuild

    at Function.require$$0.Module._resolveFilename (src\core.pnp.cjs:32727:13)

    at Function.resolve (node:internal/modules/cjs/helpers:108:19)

    at generateBinPath (src\core.yarn\unplugged@netlify-esbuild-npm-0.14.25-0402108100\node_modules@netlify\esbuild\bin\esbuild:159:48)

    at Object. (src\core.yarn\unplugged@netlify-esbuild-npm-0.14.25-0402108100\node_modules@netlify\esbuild\bin\esbuild:171:27)

    at Module._compile (node:internal/modules/cjs/loader:1105:14)

    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)

    at Object.require$$0.Module._extensions..js (src\core.pnp.cjs:32771:33)

    at Module.load (node:internal/modules/cjs/loader:981:32)

    at Function.require$$0.Module._load (src\core.pnp.cjs:32594:22)

    at ModuleWrap. (node:internal/modules/esm/translators:170:29)

    at checkExecSyncError (node:child_process:828:11)
    at Object.execFileSync (node:child_process:863:15)
    at validateBinaryVersion (src\core.yarn\unplugged@netlify-esbuild-npm-0.14.25-0402108100\node_modules@netlify\esbuild\install.js:104:32)
    at src\core.yarn\unplugged@netlify-esbuild-npm-0.14.25-0402108100\node_modules@netlify\esbuild\install.js:252:5 {
    status: 1,
    signal: null,
    output: [
    null,
    Buffer(0) [Uint8Array] [],
    Buffer(1548) [Uint8Array] [
    68, 58, 92, 66, 108, 117, 101, 115, 104, 105, 102, 116,
    92, 66, 111, 104, 114, 92, 115, 114, 99, 92, 99, 111,
    114, 101, 92, 46, 112, 110, 112, 46, 99, 106, 115, 58,
    51, 50, 55, 50, 55, 13, 10, 32, 32, 32, 32, 32,
    32, 69, 114, 114, 111, 114, 46, 99, 97, 112, 116, 117,
    114, 101, 83, 116, 97, 99, 107, 84, 114, 97, 99, 101,
    40, 102, 105, 114, 115, 116, 69, 114, 114, 111, 114, 41,
    59, 13, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32,
    32, 32, 32, 94,
    ... 1448 more items
    ]
    ],
    pid: 26896,
    stdout: Buffer(0) [Uint8Array] [],
    stderr: Buffer(1548) [Uint8Array] [
    68, 58, 92, 66, 108, 117, 101, 115, 104, 105, 102, 116,
    92, 66, 111, 104, 114, 92, 115, 114, 99, 92, 99, 111,
    114, 101, 92, 46, 112, 110, 112, 46, 99, 106, 115, 58,
    51, 50, 55, 50, 55, 13, 10, 32, 32, 32, 32, 32,
    32, 69, 114, 114, 111, 114, 46, 99, 97, 112, 116, 117,
    114, 101, 83, 116, 97, 99, 107, 84, 114, 97, 99, 101,
    40, 102, 105, 114, 115, 116, 69, 114, 114, 111, 114, 41,
    59, 13, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32,
    32, 32, 32, 94,
    ... 1448 more items
    ]
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant