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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: unhandled promise rejection type error undefined is not an object evaluating this$msg.stts.code #13255

Closed
1 task
PrathyushaKadiri opened this issue May 4, 2021 · 4 comments
Labels
i: needs triage Needs Info outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Comments

@PrathyushaKadiri
Copy link

PrathyushaKadiri commented May 4, 2021

馃捇

  • Would you like to work on a fix?

How are you using Babel?

Programmatic API (babel.transform, babel.parse)

Input code

var setPrototypeOf = require("./setPrototypeOf");

var isNativeReflectConstruct = require("./isNativeReflectConstruct");

function _construct(Parent, args, Class) {
  if (isNativeReflectConstruct()) {
    module.exports = _construct = Reflect.construct;
  } else {
    module.exports = _construct = function _construct(Parent, args, Class) {
      var a = [null];
      a.push.apply(a, args);
      var Constructor = Function.bind.apply(Parent, a);
      var instance = new Constructor();
      if (Class) setPrototypeOf(instance, Class.prototype);
      return instance;
    };
  }

  return _construct.apply(null, arguments);
//Giving error here
}

module.exports = _construct;

Configuration file name

No response

Configuration

No response

Current and expected behavior

should not give any error

Environment

babel version : ^7.9.6
Node Vesrion: v15.12.0

Possible solution

No response

Additional context

No response

@babel-bot
Copy link
Collaborator

Hey @PrathyushaKadiri! 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."

@PrathyushaKadiri
Copy link
Author

node_modules/react-native/node_modules/@babel/runtime/helpers/construct.js

This is the file locations which we are getting the this issue.

@nicolo-ribaudo
Copy link
Member

The code you posted (which is a Babel runtime helper) doesn't contain any reference to this$msg.stts.code. That helper is used to compile classes: can you share the input and compiled code of the class in your sources that is giving problems?

@babel-bot
Copy link
Collaborator

Hi @PrathyushaKadiri! This issue is missing some important information we'll need to be able to reproduce this issue.

Please understand that we receive a high volume of issues, and there are only a limited number of volunteers that help maintain this project. The easier it is for us to decipher an issue with the info provided, the more likely it is that we'll be able to help.

Please make sure you have the following information documented in this ticket:

  1. Your Babel configuration (typically from .babelrc or babel.config.js)
  2. The current (incorrect) behavior you're seeing
  3. The behavior you expect
  4. A short, self-contained example

Please provide either a link to the problem via the repl, or if the repl is insufficient, a new and minimal repository with instructions on how to build/replicate the issue.

@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Aug 31, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
i: needs triage Needs Info outdated A closed issue/PR that is archived due to age. Recommended to make a new issue
Projects
None yet
Development

No branches or pull requests

3 participants