Uploaded image for project: 'Realm JavaScript SDK'
  1. Realm JavaScript SDK
  2. RJS-237

Cannot Debug inside VSCode: Cannot find module 'sync-request'

      <!---

      Questions: If you have questions about HOW TO use Realm, please ask on
      StackOverflow: http://stackoverflow.com/questions/ask?tags=realm
      We monitor the realm tag.

      Feature Request: Just fill in the first two sections below.

      Bugs: To help you as fast as possible with an issue please describe your issue
      and the steps you have taken to reproduce it in as much detail as possible.

      -->

      Goals

      <!--- What are you trying to achieve? -->
      I want to debug my app on iOS and Android devices (not simulators) in Visual Studio Code

      Expected Results

      <!--- What did you expect to happen? -->
      It crashes at the start with a "Cannot find module 'sync-request'" error.

      Actual Results

      <!--- What happened instead? -->
      <!--- e.g. the stack trace of a crash -->

      The require('sync-request') call from this line fails. If the debug session is started without visual studio code I receive a CORS issue.

      Steps to Reproduce

      <!--- What are steps we can follow to reproduce this issue? -->

      1. Install the vscode-react-native extension in Visual Studio Code (v1.24.1)
      2. Start the packager (CMD + Shift + P -> Start Packager)
      3. Start the debug launch configuration "Attach to Packager" from react-native
      4. Start a remote debug session from a connected device
        -> The error is thrown.

      Code Sample

      <!---
      Please provide a code sample or test case that highlights the issue.
      If relevant, include your model definitions.
      For larger code samples, links to external gists/repositories are preferred.
      Full projects that we can compile and run ourselves are ideal!
      -->

      Version of Realm and Tooling

      • Realm JS SDK Version: 2.10.0
      • Node or React Native: React Native 0.55.2
      • Client OS & Version: macOS 10.13.5
      • Which debugger for React Native: Visual Studio Code 1.24.1

            Assignee:
            Unassigned Unassigned
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: