Skip to content

React Native Incompatibility: TypeError: (0 , _getPrototypeOf2.default) is not a function #699

@EtDu

Description

@EtDu

Console Error:

TypeError: (0 , _getPrototypeOf2.default) is not a function

In the Javascript bundle:

var _getPrototypeOf2 = _$$_REQUIRE(_dependencyMap[0], "@babel/runtime/helpers/interopRequireDefault")(_$$_REQUIRE(_dependencyMap[6], "@babel/runtime/helpers/getPrototypeOf"));

if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor;

Corresponding Source @babel/runtime/helpers/getPrototypeOf :

function _getPrototypeOf(o) {
  module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
    return o.__proto__ || Object.getPrototypeOf(o);
  };
  module.exports["default"] = module.exports, module.exports.__esModule = true;
  return _getPrototypeOf(o);
}

module.exports = _getPrototypeOf;
module.exports["default"] = module.exports, module.exports.__esModule = true;

It seems that getPrototypeOf2.default is undefined in this case. Perhaps because of this phase during lockdown():

Removing intrinsics.Object.getPrototypeOf.default

Metadata

Metadata

Assignees

No one assigned

    Labels

    kriskowal-reviewed-2024-01Issues that kriskowal is satisfied do not need attention from team bug review as of January, 2024

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions