bun
bun copied to clipboard
Error: Attempted to assign to readonly property.
What version of Bun is running?
1.1.2
What platform is your computer?
x64
What steps can reproduce the bug?
What is the expected behavior?
To build without problems, it was working fine in bun 1.0.3
What do you see instead?
#30 [linux/amd64 frontendbuilder 4/5] RUN bun install --cwd /frontend
#30 17.70 Error: Attempted to assign to readonly property.
#30 17.70 at _beforeError (/frontend/node_modules/got/dist/source/core/index.js:1217:14)
#30 17.70 at <anonymous> (/frontend/node_modules/got/dist/source/core/index.js:951:35)
#30 17.70 at asyncFunctionResume (native)
#30 17.70 at promiseReactionJobWithoutPromiseUnwrapAsyncContext (native)
#30 17.70 at promiseReactionJob (native)
#30 17.70 at processTicksAndRejections (native)
#30 17.70 at <anonymous> (/frontend/node_modules/got/dist/source/core/index.js:585:20)
#30 17.70 at _onResponseBase (/frontend/node_modules/got/dist/source/core/index.js:579:31)
#30 17.70 at <anonymous> (/frontend/node_modules/got/dist/source/core/index.js:715:35)
#30 17.70 at _onResponse (/frontend/node_modules/got/dist/source/core/index.js:713:27)
#30 17.70 at <anonymous> (/frontend/node_modules/got/dist/source/core/index.js:726:25)
#30 17.70 at emit (native)
#30 17.70 at <anonymous> (/frontend/node_modules/@szmarczak/http-timer/dist/source/index.js:40:20)
#30 17.70 at <anonymous> (node:http:914:58)
#30 17.70 at processTicksAndRejections (:12:39)
#30 17.70
#30 17.70 error: postinstall script from "electron" exited with 1
#30 ERROR: process "/bin/sh -c bun install --cwd /frontend" did not complete successfully: exit code: 1
Additional information
node_modules/@szmarczak/http-timer/dist/source/index.js
33 │ const handleError = (origin) => {
34 │ const emit = origin.emit.bind(origin);
35 │ origin.emit = (event, ...args) => {
36 │ // Catches the `error` event
37 │ if (event === 'error') {
38 │ timings.error = Date.now();
39 │ timings.phases.total = timings.error - timings.start;
40 │ origin.emit = emit;
41 │ }
42 │ // Saves the original behavior
43 │ return emit(event, ...args);
44 │ };
45 │ };
PS: It works fine locally on mac, linux and in CI, but it fails on bun docker images
@patrickelectric Do you happen to know what origin is?