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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
3 tasks done
michaelknoch opened this issue Sep 11, 2018 · 3 comments
Closed
3 tasks done
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@michaelknoch
Copy link

michaelknoch commented Sep 11, 2018

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
@michaelknoch
Copy link
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
Copy link

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
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

4 participants