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
Libraries that require installation located in .yarn/unplugged/, such as the mozjpeg, optipng-bin, and cwebp-bin libraries, causing install to fail.
However, the strange thing is that it works fine on macos, but fails on ubuntu.
To summarize, it seems that require is not working properly in the case of using the ubuntu environment and the experimental loader API.
To reproduce
Steps to Reproduce
Create a package.json file with the following content:
Yarn should successfully install the mozjpeg package.
Actual Behavior
Yarn fails with the following error:
➤ YN0000: · Yarn 4.1.1
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed
➤ YN0000: ┌ Link step
➤ YN0000: │ ESM support for PnP uses the experimental loader API and is therefore experimental
➤ YN0007: │ mozjpeg@npm:8.0.0 must be built because it never has been before or the last one failed
➤ YN0009: │ mozjpeg@npm:8.0.0 couldn't be built successfully (exit code 1, logs can be found here: /tmp/xfs-bb95cc93/build.log)
➤ YN0000: └ Completed in 0s 308ms
➤ YN0000: · Failed with errors in 0s 454ms
The error log contains the following message:
# This file contains the result of Yarn building a package (mozjpeg@npm:8.0.0)
# Script name: postinstall
node:internal/modules/cjs/loader:1143
const err = new Error(message);
^
Error: Cannot find module 'decompress'
Require stack:
- /home1/runner/.yarn/berry/cache/bin-build-npm-3.0.0-41c58b5458-10c0.zip/node_modules/bin-build/index.js
Require stack:
- /home1/runner/.yarn/berry/cache/bin-build-npm-3.0.0-41c58b5458-10c0.zip/node_modules/bin-build/index.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1143:15)
at require$$0.Module._resolveFilename (/home1/runner/_work/test/.pnp.cjs:7119:54)
at Module._load (node:internal/modules/cjs/loader:984:27)
at require$$0.Module._load (/home1/runner/_work/test/.pnp.cjs:7033:31)
at Module.require (node:internal/modules/cjs/loader:1231:19)
at require (node:internal/modules/helpers:179:18)
at Object.<anonymous> (/home1/runner/.yarn/berry/cache/bin-build-npm-3.0.0-41c58b5458-10c0.zip/node_modules/bin-build/index.js:2:20)
at Module._compile (node:internal/modules/cjs/loader:1369:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
at require$$0.Module._extensions..js (/home1/runner/_work/test/.pnp.cjs:7185:33) {
code: 'MODULE_NOT_FOUND'
}
Node.js v20.12.2
graph TD
A["mozjpeg@8.0.0(in unplugged)"] --"OK"--> B["bin-build@3.0.0(in cache)"]
B --"failed to resolve"--> C["decompress(in cache)"]
ronparkdev
changed the title
[Bug?]: Yarn Berry installation error with mozjpeg on Ubuntu
[Bug?]: Yarn Berry installation error with mozjpeg on Linux
Apr 24, 2024
Self-service
Describe the bug
Libraries that require installation located in
.yarn/unplugged/
, such as the mozjpeg, optipng-bin, and cwebp-bin libraries, causing install to fail.However, the strange thing is that it works fine on macos, but fails on ubuntu.
To summarize, it seems that
require
is not working properly in the case of using the ubuntu environment and the experimental loader API.To reproduce
Steps to Reproduce
package.json
file with the following content:Expected Behavior
Yarn should successfully install the mozjpeg package.
Actual Behavior
Yarn fails with the following error:
The error log contains the following message:
Environment
System: OS: Linux 4.19 Ubuntu 20.04.6 LTS (Focal Fossa) CPU: (48) x64 Intel(R) Xeon(R) Silver 4214 CPU @ 2.20GHz Binaries: Node: 20.12.2 - /tmp/xfs-da51de7b/node Yarn: 4.1.1 - /tmp/xfs-da51de7b/yarn npm: 10.5.0 - ~/.nvm/versions/node/v20.12.2/bin/npm
Additional context
No response
The text was updated successfully, but these errors were encountered: