Skip to content

[0.57.0-rc.4] cli crashes when trying to run local development server #21054

@michaelknoch

Description

@michaelknoch

Environment

React Native Environment Info:
    System:
      OS: macOS High Sierra 10.13.6
      CPU: x64 Intel(R) Core(TM) i5-6267U CPU @ 2.90GHz
      Memory: 7.22 GB / 16.00 GB
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 8.11.3 - /usr/local/bin/node
      npm: 6.1.0 - /usr/local/bin/npm
      Watchman: 4.7.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 11.4, macOS 10.13, tvOS 11.4, watchOS 4.3
      Android SDK:
        Build Tools: 23.0.1, 23.0.2, 23.0.3, 25.0.1, 25.0.2, 25.0.3, 26.0.0, 26.0.1, 26.0.2, 27.0.0, 27.0.3
        API Levels: 23, 24, 25, 26, 27
    IDEs:
      Android Studio: 3.1 AI-173.4819257
      Xcode: 9.4.1/9F2000 - /usr/bin/xcodebuild
    npmPackages:
      react: ^16.4.1 => 16.4.1 
      react-native: 0.57.0-rc.4 
    npmGlobalPackages:
      react-native-cli: 2.0.1
      react-native-git-upgrade: 0.2.7
      react-native: 0.56.0

Description

I tried to run my app with rn 0.57rc 4 but it seems that weird things are happening when transforming local-cli/server/server.js. I migrated from babel-preset-react-native to metro-react-native-babel-preset. The cli crashes when trying to start local development server.

> node node_modules/react-native/local-cli/cli.js start

/Users/michaelknoch/dev/flow/smartphone-app/node_modules/@babel/core/lib/transformation/normalize-file.js:209
    throw err;
    ^

SyntaxError: .../node_modules/react-native/local-cli/server/server.js: Unexpected token, expected ";" (9:32)

   7 |         })
   8 |       );
>  9 | /* remotedev-server end */ code is licensed under the MIT license found in the
     |                                 ^
  10 |  * LICENSE file in the root directory of this source tree.
  11 |  *
  12 |  * @format

Activity

michaelknoch

michaelknoch commented on Sep 12, 2018

@michaelknoch
Author

sorry my bad. I used a deprecated remote-debugger package that injected code into server.js on postinstall. It seems that this package was compatible with 0.56 but isn't compatible with 0.57 anymore

mattvick

mattvick commented on Sep 16, 2018

@mattvick

I'm having the same issue when running the following command, with react native 0.57:

$ remotedev --hostname=localhost --port=8000 --injectserver=reactnative

Which remote dev tools, remote-debugger packages should I switch to?

Currently I'm using remote-redux-devtools version 0.5.13 and remotedev-server version 0.2.5.

krzysztof-miemiec

krzysztof-miemiec commented on Sep 21, 2018

@krzysztof-miemiec

I created PR with a quick fix for that: zalmoxisus/remotedev-server#61 😉

locked as resolved and limited conversation to collaborators on Sep 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @krzysztof-miemiec@mattvick@michaelknoch@react-native-bot

        Issue actions

          [0.57.0-rc.4] cli crashes when trying to run local development server · Issue #21054 · facebook/react-native