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

Error using bluebird with --frozen-intrinsics #1717

Open
kevinoid opened this issue Nov 6, 2024 · 0 comments
Open

Error using bluebird with --frozen-intrinsics #1717

kevinoid opened this issue Nov 6, 2024 · 0 comments

Comments

@kevinoid
Copy link
Contributor

kevinoid commented Nov 6, 2024

  1. What version of bluebird is the issue happening on?
    3.7.2

  2. What platform and version? (For example Node.js 0.12 or Google Chrome 32)
    Node.js v11.12 and later

  3. Did this issue happen with earlier version of bluebird?
    The issue is present in bluebird 2.x and 3.x, but not 1.x.

When node is invoked with the experimental --frozen-intrinsics flag (added in Node.js 11.12 by nodejs/node#25685) it causes bluebird to throw TypeError: Cannot define property __BluebirdErrorTypes__, object is not extensible:

$ node --frozen-intrinsics -e "require('bluebird')"
/path/to/node_modules/bluebird/js/release/errors.js:99
    es5.defineProperty(Error, "__BluebirdErrorTypes__", {
        ^

TypeError: Cannot define property __BluebirdErrorTypes__, object is not extensible
    at Object.defineProperty (<anonymous>)
    at Object.<anonymous> (/path/to/node_modules/bluebird/js/release/errors.js:99:9)
    at Module._compile (node:internal/modules/cjs/loader:1572:14)
    at Object..js (node:internal/modules/cjs/loader:1709:10)
    at Module.load (node:internal/modules/cjs/loader:1315:32)
    at Function._load (node:internal/modules/cjs/loader:1125:12)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:216:24)
    at Module.require (node:internal/modules/cjs/loader:1337:12)
    at require (node:internal/modules/helpers:139:16)

Node.js v23.1.0

Is there any chance bluebird might consider supporting --frozen-intrinsics?

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