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.

Invalid character in findSymlinkModules.js line 37 when running react-native run-android

See original GitHub issue

Is this a bug report?

Yes

Have you read the Contributing Guidelines?

No

Environment

  OS:  Linux 4.8
  Node:  8.5.0
  Yarn:  Not Found
  npm:  5.3.0
  Watchman:  4.9.0

Issue

When I run react-native run-android I get

/home/yenda/status-react/node_modules/react-native/local-cli/util/findSymlinkedModules.js:37
ignoredRoots? = [])
            ^

SyntaxError: Unexpected token ?
    at createScript (vm.js:74:10)
    at Object.runInThisContext (vm.js:116:10)
    at Module._compile (module.js:588:28)
    at loader (/home/yenda/status-react/node_modules/metro-bundler/node_modules/babel-register/lib/node.js:144:5)
    at Object.require.extensions.(anonymous function) [as .js] (/home/yenda/status-react/node_modules/metro-bundler/node_modules/babel-register/lib/node.js:154:7)
    at Module.load (module.js:545:32)
    at tryModuleLoad (module.js:508:12)
    at Function.Module._load (module.js:500:3)
    at Module.require (module.js:568:17)
    at require (internal/module.js:11:18)

Removing the ? fixes it. https://github.com/facebook/react-native/blob/master/local-cli/util/findSymlinkedModules.js#L37

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
sibeliuscommented, Nov 20, 2017

I have the same issue, any other fix?

3reactions
yendacommented, Oct 19, 2017

I just deleted my repo and re-cloned it and the error disappeared

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native Manifest invalid character '-' - Stack Overflow
When I try to run npm run android command, I receive an error such: AAPT: Tag attribute package has invalid character '-'.
Read more >
Headless JS - React Native
Headless JS is a way to run tasks in JavaScript while your app is in the background. It can be used, for example,...
Read more >
npx react-native run-android build failed - You.com
I get this error when i run npx react-native run-android in folder. Everything is installed, emulator running, USB debuggin enabled, node v12, ...
Read more >
Getting Started with React Native on Android | Pluralsight
React Native is one of the most famous open-source hybrid frameworks to build apps for Android, iOS, and web platforms using JavaScript with ......
Read more >
'react-native' is not recognized as an internal or external ...
2 thoughts on “'react-native' is not recognized as an internal or external command” ... again. At line:1 char:1 + react-native run-android + ~ ......
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