-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
[Bug]: Cannot assign to read only property 'stackTraceLimit' #15625
Comments
Hey @loynoir! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly. If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite. |
Ideally we should also have a test with |
|
I'm on v18.15.0. What version are you using? |
v19.8.1 |
🤔 Are you using nodejs wrapper that does not accept CLI flags? $ img=docker.io/library/node:19.8.1@sha256:1fab548e95c779df229e4b50d8d20e222597bda15aeece508098c5ba7723302e
$ docker run --rm -it -v "$PWD":/app -w /app "$img" node --frozen-intrinsics ./reproduce.mjs
(node:1) ExperimentalWarning: The --frozen-intrinsics flag is experimental
(Use `node --trace-warnings ...` to show where the warning was created)
/app/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js:65
Error.stackTraceLimit && (Error.stackTraceLimit = Math.max(Error.stackTraceLimit, MIN_STACK_TRACE_LIMIT));
^
TypeError <Object <Object <[Object: null prototype] {}>>>: Cannot assign to read only property 'stackTraceLimit' of function 'function Error() { [native code] }'
at setupPrepareStackTrace (/app/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js:65:51)
at stopHiding - secret - don't use this - v1 (/app/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js:45:5)
at parse (/app/node_modules/@babel/core/lib/parse.js:34:76)
at file:///app/reproduce.mjs:2:13
at ModuleJob.run (node:internal/modules/esm/module_job:193:25)
Node.js v19.8.1 $ img=docker.io/library/node:20@sha256:0efc3ef3fea2822c9d16da084c40181ed7f74b6f45141100580f9887ccc8e9a
$ docker run --rm -it -v "$PWD":/app -w /app "$img" node --frozen-intrinsics ./reproduce.mjs
(node:1) ExperimentalWarning: The --frozen-intrinsics flag is experimental
(Use `node --trace-warnings ...` to show where the warning was created)
/app/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js:65
Error.stackTraceLimit && (Error.stackTraceLimit = Math.max(Error.stackTraceLimit, MIN_STACK_TRACE_LIMIT));
^
TypeError <Object <Object <[Object: null prototype] {}>>>: Cannot assign to read only property 'stackTraceLimit' of function 'function Error() { [native code] }'
at setupPrepareStackTrace (/app/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js:65:51)
at stopHiding - secret - don't use this - v1 (/app/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js:45:5)
at parse (/app/node_modules/@babel/core/lib/parse.js:34:76)
at file:///app/reproduce.mjs:2:13
at ModuleJob.run (node:internal/modules/esm/module_job:192:25)
Node.js v20.1.0 |
Strangely, when I test inside babel, it throws this error.😕 |
Assignment to read-only properties only throws in strict mode! |
💻
How are you using Babel?
Programmatic API (
babel.transform
,babel.parse
)Input code
Configuration file name
No response
Configuration
No response
Current and expected behavior
Environment
"@babel/core": "^7.21.8"
node v18.15.0
Possible solution
$ node --frozen-intrinsics reproduce.mjs (node:604212) ExperimentalWarning: The --frozen-intrinsics flag is experimental (Use `node --trace-warnings ...` to show where the warning was created) File
Additional context
No response
The text was updated successfully, but these errors were encountered: