question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

constructor must be of type 'function' on debugger mode

See original GitHub issue

Goals

It is working as well without debugger mode. But on debugger mode, we are getting error when try to create Realm object with schema parameters.

Expected Results

It should work like without debugger

Actual Results

image

image

Code Sample

image

Version of Realm and Tooling

  • Realm JS SDK Version: 2.17.0
  • React Native: 0.57.1
  • Client OS: Android
  • Which debugger for React Native: Chrome

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:18
  • Comments:32 (3 by maintainers)

github_iconTop GitHub Comments

14reactions
mistikkcommented, Oct 13, 2018

It is related from last version of realm(v2.18.0). You should downgrade to 2.16.0. And dont forgot to check version number on package.json. It should be “realm”: “2.16.0” not “realm”: “ˆ2.16.0”. I lost 1 day for that 😤

After that, run this code for reset all packages; watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && yarn cache clean && yarn install && yarn start -- --reset-cache

4reactions
mistikkcommented, Oct 8, 2018

I am still getting this error with realm v2.18.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Realm/React-Native debugger]: constructor must be of type ...
But on debugger mode, I am getting error when try to create Realm object with schema parameters. import Realm from 'realm'; class Todo...
Read more >
Enhancing Debugging with the Debugger Display Attributes
The DebuggerDisplayAttribute constructor has a single argument: a string to be displayed in the value column for instances of the type.
Read more >
A Brief Introduction to GDB, including its use within emacs
A debugger is a program that is used to run other programs. In a debugger, a program may be executed, debugged, or a...
Read more >
TypeError: "x" is not a constructor - JavaScript - MDN Web Docs
The JavaScript exception "is not a constructor" occurs when there was an attempt to use an object or ... To do this, you...
Read more >
Fixing common type problems - Dart programming language
Static errors and warnings · Undefined member · Invalid method override · Missing type arguments · Unexpected collection element type · Constructor initialization ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found