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

@hapi/boom error #283

Closed
xusai2014 opened this issue May 18, 2021 · 2 comments · May be fixed by doron2402/boom#3
Closed

@hapi/boom error #283

xusai2014 opened this issue May 18, 2021 · 2 comments · May be fixed by doron2402/boom#3
Labels
support Questions, discussions, and general support

Comments

@xusai2014
Copy link

xusai2014 commented May 18, 2021

Support plan

  • is this issue currently blocking your project? (yes/no): yes
  • is this issue affecting a production system? (yes/no): yes

Context

  • node version: 14.16.0
  • module version with issue: 9.1.2
  • last module version without issue: same
  • environment (e.g. node, browser, native): node
  • used with (e.g. hapi application, another framework, standalone, ...): nextjs dependency
  • any other relevant information:

What are you trying to achieve or the steps to reproduce?

Error is as below


/node_modules/@hapi/boom/lib/index.js:69
exports.Boom = class extends Error {
               ^
TypeError: Cannot assign to read only property 'Symbol(Symbol.hasInstance)' of function 'function Boom(message, options) {
        if (options === void 0) { options = {}; }
        var _this = this;
 ...<omitted>... }'
    at /node_modules/@hapi/boom/lib/index.js:92:32
    at Object.<anonymous> (/node_modules/@hapi/boom/lib/index.js:69:16)

What was the result you got?

What result did you expect?

@xusai2014 xusai2014 added the support Questions, discussions, and general support label May 18, 2021
@Nargonath
Copy link
Member

The tests are successful on node@14 on our part for the latest version so my guess is that the problem comes from the way @hapi/boom is used. From your stacktrace it seems perhaps something is trying to assign to the static method Symbol.hasInstance on the Boom prototype after it has been defined. 🤔 Did you share the full stacktrace?

@devinivy
Copy link
Member

devinivy commented Jun 10, 2021

Seems like this may have become an inactive issue. The only thing I have to add is that it sounds like you may be trying to bundle boom for the browser, which isn't officially supported by this module, which is designed for server-side usage. But if you're intent on doing it, then it may require configuring your bundler to treat boom as a nodejs module rather than something pre-built for the browser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support Questions, discussions, and general support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants