React-native: RNTester-Windows-Android

Created on 11 Jun 2018  路  11Comments  路  Source: facebook/react-native

Environment

Environment:
OS: Windows 10
Node: 10.4.0
Yarn: Not Found
npm: 6.1.0
Watchman: Not Found
Xcode: N/A
Android Studio: Not Found

Packages: (wanted => installed)
react: 16.3.1 => 16.3.1
react-native: 0.55.4 => 0.55.4

Description

After Following instruction in Running on Android Section here

./gradlew :RNTester:android:app:installDebug work well for installing app, and the app icon shows up as well in my emulator and devices too.

s80611-21095483

but i got some error while run ./scripts/packager.sh whiches run same as node ./local-cli/cli.js start i think.

error

error text output

C:\Users\icreativelabs\Documents\react-native\local-cli\cliEntry.js:28
import type {CommandT} from './commands';
^^^^
SyntaxError: Unexpected identifier
at new Script (vm.js:74:7)
at createScript (vm.js:246:10)
at Object.runInThisContext (vm.js:298:10)
at Module._compile (internal/modules/cjs/loader.js:670:28)
at Module._compile (C:\Users\icreativelabs\Documents\react-native\node_modules\pirates\lib\index.js:91:24)
at Module._extensions..js (internal/modules/cjs/loader.js:713:10)
at Object.newLoader [as .js] (C:\Users\icreativelabs\Documents\react-native\node_modules\pirates\lib\index.js:96:7)
at Module.load (internal/modules/cjs/loader.js:612:32)
at tryModuleLoad (internal/modules/cjs/loader.js:551:12)
at Function.Module._load (internal/modules/cjs/loader.js:543:3)
PS C:\Users\icreativelabs\Documents\react-native>

and i dont have an idea what happen, because i init new react native app
and run npm start or node node_modules/react-native/local-cli/cli.js start
here result.

work

Android Windows Locked

Most helpful comment

I created a pr for this issue https://github.com/facebook/react-native/pull/19974, but now it blocked by an metro issue.

All 11 comments


It looks like your issue may be incomplete. Are all the fields required by the Issue Template filled out?

If you believe your issue contains all the relevant information, let us know in order to have a maintainer remove the No Template label.

It's preferable to copy and paste the actual text output here into the issue. You can use a \ box if it's too much text. It will allow others to stumble upon this issue using search, and it's also way more readable than a screenshot.

I copy and paste the error output, can see under error screenshot. Hope that can be help

The script is written for unix-like system. I am working on a pr to make it work on windows. You can check it here RNTester-windows. But I run into a issue in metro https://github.com/facebook/metro/issues/181. You can try release build, but I run into some weird gradle error on windows https://github.com/facebook/react-native/pull/19758.

Same error react-native init

Any progress on this?
_Windows users can relate to airbnb._

I created a pr for this issue https://github.com/facebook/react-native/pull/19974, but now it blocked by an metro issue.

run $ react-native init --version 0.55.0

The pr has been complete, after it got merged you can take a try.

I'm pretty sure the original reported problem has been fixed by updating Babel past the point of introducing the problem. If the issue is still open now (Metro 42.2, RN 0.57) please open a new ticket.

@pvdz Nope, you can't run a bash file on windows. It's not just the type thing. The main purpose here is to debug RNTester on windows.

Was this page helpful?
0 / 5 - 0 ratings