You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a cdk application that uses Yarn 2 Plug and Play. We use this package to leverage the esbuild-plugin-pnp as described in your examples.
When we upgrade to 3.6.0 or 3.7.0 cdk synth fails with
Bundling asset end-user-iam-dev-feature-ceg-m-ikccks/UserPool/CognitoLambdas/PostConfirmation/TypeScriptCode/Stage...
Error: The service was stopped: spawn undefined ENOENT
at /builds/warrify/services/end-user-iam/.yarn/unplugged/esbuild-npm-0.14.49-8ea32c7f59/node_modules/esbuild/lib/main.js:1337:25
at /builds/warrify/services/end-user-iam/.yarn/unplugged/esbuild-npm-0.14.49-8ea32c7f59/node_modules/esbuild/lib/main.js:666:9
at ChildProcess.afterClose (/builds/warrify/services/end-user-iam/.yarn/unplugged/esbuild-npm-0.14.49-8ea32c7f59/node_modules/esbuild/lib/main.js:644:7)
at ChildProcess.emit (node:events:527:28)
at Process.ChildProcess._handle.onexit (node:internal/child_process:289:12)
at onErrorNT (node:internal/child_process:478:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
node:internal/process/esm_loader:94
internalBinding('errors').triggerUncaughtException(
^
Error: The service was stopped: spawn undefined ENOENT
at /builds/warrify/services/end-user-iam/.yarn/unplugged/esbuild-npm-0.14.49-8ea32c7f59/node_modules/esbuild/lib/main.js:13[37](https://gitlab.com/warrify/services/end-user-iam/-/jobs/2709204974#L37):25
at /builds/warrify/services/end-user-iam/.yarn/unplugged/esbuild-npm-0.14.49-8ea32c7f59/node_modules/esbuild/lib/main.js:666:9
at ChildProcess.afterClose (/builds/warrify/services/end-user-iam/.yarn/unplugged/esbuild-npm-0.14.49-8ea32c7f59/node_modules/esbuild/lib/main.js:644:7)
at ChildProcess.emit (node:events:527:28)
at Process.ChildProcess._handle.onexit (node:internal/child_process:289:12)
at onErrorNT (node:internal/child_process:478:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
/builds/warrify/services/end-user-iam/.yarn/unplugged/aws-cdk-lib-virtual-[47](https://gitlab.com/warrify/services/end-user-iam/-/jobs/2709204974#L47)bf6f84bd/node_modules/aws-cdk-lib/core/lib/asset-staging.js:2
The interesting part being spawn undefined ENOENT
When we explicitly set ESBUILD_BINARY_PATH=/workspace/npm-packages/.yarn/unplugged/esbuild-npm-0.14.49-8ea32c7f59/node_modules/esbuild/lib/pnpapi-esbuild-linux-64-esbuild or ESBUILD_BINARY_PATH=/workspace/npm-packages/.yarn/unplugged/esbuild-linux-64-npm-0.14.49-96241737d6/node_modules/esbuild-linux-64/bin/esbuild then synth succeeds.
To make things even weirder: The first lambda function build succeeds but if you have more than 1 Lambda Function then it starts failing (the stack trace shows that the error comes from esbuild in a function named buildOrServeContinue).
To Reproduce
Create a repo using yarn 2 plug&play
Create a stack with 2 lambda functions
run cdk synth
Expected behavior
The automatic inference of the binary path should continue to work as it did in 3.5.0
Versions:
CDK: 2.31.1
Node.js: 16.16.0
Additional context
The text was updated successfully, but these errors were encountered:
matthias-pichler
changed the title
esbuild binary path is not correctly detected in 3.6.0 & and 3.7.0 when using Yarn 2 Plug&Play
esbuild binary path is not correctly detected in 3.6.0 and 3.7.0 when using Yarn 2 Plug&Play
Jul 15, 2022
Describe the bug
We have a cdk application that uses Yarn 2 Plug and Play. We use this package to leverage the esbuild-plugin-pnp as described in your examples.
When we upgrade to 3.6.0 or 3.7.0
cdk synth
fails withThe interesting part being
spawn undefined ENOENT
When we explicitly set
ESBUILD_BINARY_PATH=/workspace/npm-packages/.yarn/unplugged/esbuild-npm-0.14.49-8ea32c7f59/node_modules/esbuild/lib/pnpapi-esbuild-linux-64-esbuild
orESBUILD_BINARY_PATH=/workspace/npm-packages/.yarn/unplugged/esbuild-linux-64-npm-0.14.49-96241737d6/node_modules/esbuild-linux-64/bin/esbuild
then synth succeeds.To make things even weirder: The first lambda function build succeeds but if you have more than 1 Lambda Function then it starts failing (the stack trace shows that the error comes from esbuild in a function named
buildOrServeContinue
).To Reproduce
cdk synth
Expected behavior
The automatic inference of the binary path should continue to work as it did in 3.5.0
Versions:
Additional context
The text was updated successfully, but these errors were encountered: