Skip to content

RNTester IOS throwing error upon launch from XCode #18949

@DavidSBowen

Description

@DavidSBowen

When launching RNTester from XCode, an error is thrown in XCode, Metro Bundler, and IOS Simulator red screen.

Environment

Environment:
OS: macOS High Sierra 10.13.3
Node: 9.9.0
Yarn: 1.5.1
npm: 5.8.0
Watchman: 4.9.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 3.1 AI-173.4697961

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

Steps to Reproduce

Simply open RNTester.xcodeproj in XCode and press Run

Expected Behavior

I was expecting the program to open

Actual Behavior

The program crashed. Information as follows:

Last login: Wed Apr 18 11:28:38 on ttys003 -bash: /Users/<username>/.profile: No such file or directory /Users/\<username\>/Files/Programming/Learning/react-native/scripts/launchPackager.command ; exit;

Davids-MacBook-Pro:~ <username>$ /Users/\<username\>/Files/Programming/Learning/react-native/scripts/launchPackager.command ; exit;

/Users/\<username\>/Files/Programming/Learning/react-native/node_modules/babel-core/lib/transformation/file/index.js:590 throw err; ^

SyntaxError: /Users/\<username\>/Files/Programming/Learning/react-native/local-cli/core/index.js: Unexpected token (28:12)

26 | const path = require('path');

27 |

> 28 | import type {CommandT} from '../commands';

| ................ ^ **it is pointing at the opening { here**

29 | import type {ConfigT} from 'metro';

30 |

31 | export type RNConfig = {

at Parser.pp$5.raise (/Users/\<username\>/Files/Programming/Learning/react-native/node_modules/babylon/lib/index.js:4454:13)

at Parser.pp.unexpected (/Users/\<username\>/Files/Programming/Learning/react-native/node_modules/babylon/lib/index.js:1761:8)

at Parser.pp.expectContextual (/Users/\<username\>/Files/Programming/Learning/react- native/node_modules/babylon/lib/index.js:1723:39)

at Parser.pp$1.parseImport (/Users/\<username\>/Files/Programming/Learning/react-native/node_modules/babylon/lib/index.js:2869:10)

at Parser.pp$1.parseStatement (/Users/\<username\>/Files/Programming/Learning/react- native/node_modules/babylon/lib/index.js:1884:49)

at Parser.pp$1.parseBlockBody (/Users/\<username\>/Files/Programming/Learning/react- native/node_modules/babylon/lib/index.js:2268:21)

at Parser.pp$1.parseTopLevel (/Users/\<username\>/Files/Programming/Learning/react- native/node_modules/babylon/lib/index.js:1778:8)

at Parser.parse (/Users/\<username\>/Files/Programming/Learning/react-native/node_modules/babylon/lib/index.js:1673:17)

at parse (/Users/\<username\>/Files/Programming/Learning/react-native/node_modules/babylon/lib/index.js:7305:37)

at File.parse (/Users/\<username\>/Files/Programming/Learning/react-native/node_modules/babel- core/lib/transformation/file/index.js:517:15)

Process terminated. Press <enter> to close the window


Simulator Red Screen says:

No script URL provided. Make sure the packager is running or you have embedded a JS bundle in your application bundle

unsanitizedScriptURLString = (null)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions