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.

Packager fails on 'platform', RN 0.28.0

See original GitHub issue

I think it’s somehow related to the new ActivityIndicator. Happens on iOS simulator, haven’t tested on a real device yet.

[8:45:07 AM] <END>   find dependencies (929ms)
[8:45:07 AM] <END>   request:/index.ios.bundle?platform=ios&dev=true (1093ms)
[8:45:07 AM] <START> request:/index.ios.bundle?platform=ios&dev=true
[8:45:07 AM] <END>   request:/index.ios.bundle?platform=ios&dev=true (26ms)
[8:45:07 AM] <START> request:/index.ios.map?platform=ios&dev=true
[8:45:08 AM] <END>   request:/index.ios.map?platform=ios&dev=true (203ms)
[8:45:12 AM] <START> symbolicate
[8:45:12 AM] <START> find dependencies
Error: Error validating module options: child "platform" fails because ["platform" must be a string]
    at /Users/avishay/geektime-app/node_modules/react-native/packager/react-packager/src/lib/declareOpts.js:60:13
    at /Users/avishay/geektime-app/node_modules/react-native/packager/react-packager/src/Server/index.js:229:20
    at tryCallOne (/Users/avishay/geektime-app/node_modules/promise/lib/core.js:37:12)
    at /Users/avishay/geektime-app/node_modules/promise/lib/core.js:123:15
    at flush (/Users/avishay/geektime-app/node_modules/asap/raw.js:50:29)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)
[8:45:12 AM] <END>   symbolicate (11ms)
transformed 843/843 (100%)
[8:45:13 AM] <END>   find dependencies (859ms)
[8:45:13 AM] <START> symbolicate
Error: Error validating module options: child "platform" fails because ["platform" must be a string]
    at /Users/avishay/geektime-app/node_modules/react-native/packager/react-packager/src/lib/declareOpts.js:60:13
    at /Users/avishay/geektime-app/node_modules/react-native/packager/react-packager/src/Server/index.js:229:20
    at tryCallOne (/Users/avishay/geektime-app/node_modules/promise/lib/core.js:37:12)
    at /Users/avishay/geektime-app/node_modules/promise/lib/core.js:123:15
    at flush (/Users/avishay/geektime-app/node_modules/asap/raw.js:50:29)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)
[8:45:13 AM] <END>   symbolicate (2ms)
[8:45:13 AM] <START> symbolicate
Error: Error validating module options: child "platform" fails because ["platform" must be a string]
    at /Users/avishay/geektime-app/node_modules/react-native/packager/react-packager/src/lib/declareOpts.js:60:13
    at /Users/avishay/geektime-app/node_modules/react-native/packager/react-packager/src/Server/index.js:229:20
    at tryCallOne (/Users/avishay/geektime-app/node_modules/promise/lib/core.js:37:12)
    at /Users/avishay/geektime-app/node_modules/promise/lib/core.js:123:15
    at flush (/Users/avishay/geektime-app/node_modules/asap/raw.js:50:29)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)
[8:45:13 AM] <END>   symbolicate (139ms)
[8:45:13 AM] <START> symbolicate
Error: Error validating module options: child "platform" fails because ["platform" must be a string]
    at /Users/avishay/geektime-app/node_modules/react-native/packager/react-packager/src/lib/declareOpts.js:60:13
    at /Users/avishay/geektime-app/node_modules/react-native/packager/react-packager/src/Server/index.js:229:20
    at tryCallOne (/Users/avishay/geektime-app/node_modules/promise/lib/core.js:37:12)
    at /Users/avishay/geektime-app/node_modules/promise/lib/core.js:123:15
    at flush (/Users/avishay/geektime-app/node_modules/asap/raw.js:50:29)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)
[8:45:14 AM] <END>   symbolicate (142ms)
[8:45:14 AM] <START> symbolicate
Error: Error validating module options: child "platform" fails because ["platform" must be a string]
    at /Users/avishay/geektime-app/node_modules/react-native/packager/react-packager/src/lib/declareOpts.js:60:13
    at /Users/avishay/geektime-app/node_modules/react-native/packager/react-packager/src/Server/index.js:229:20
    at tryCallOne (/Users/avishay/geektime-app/node_modules/promise/lib/core.js:37:12)
    at /Users/avishay/geektime-app/node_modules/promise/lib/core.js:123:15
    at flush (/Users/avishay/geektime-app/node_modules/asap/raw.js:50:29)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)
[8:45:14 AM] <END>   symbolicate (109ms)
[8:45:14 AM] <START> symbolicate
Error: Error validating module options: child "platform" fails because ["platform" must be a string]
    at /Users/avishay/geektime-app/node_modules/react-native/packager/react-packager/src/lib/declareOpts.js:60:13
    at /Users/avishay/geektime-app/node_modules/react-native/packager/react-packager/src/Server/index.js:229:20
    at tryCallOne (/Users/avishay/geektime-app/node_modules/promise/lib/core.js:37:12)
    at /Users/avishay/geektime-app/node_modules/promise/lib/core.js:123:15
    at flush (/Users/avishay/geektime-app/node_modules/asap/raw.js:50:29)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)
[8:45:14 AM] <END>   symbolicate (104ms)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
xseignardcommented, Jun 22, 2016

Well I did a react-native upgrade again, and everything is ok now.

1reaction
avishayilcommented, Jun 22, 2016

I discovered it’s happening when you passing a null value to JSON, especially on Image component that needs to re-render according to state.

constructor(props) {
    super(props);
    this.state = {
        imageURI: null // This is null, NOT OK
    };
}

and then

<Image source={{uri: this.state.imageURI}} />

Will lead to the error, while putting commas over the null initial value solves it, or just put some placeholder url or resource, until it’s re-rendered.

constructor(props) {
    super(props);
    this.state = {
        imageURI: 'null' // This is a string, OK
    };
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to load from https. LoadFileError: undefined is not a ...
Hello everyone! I am trying to load an online 3D model to view in my react-native app. I tried to copy code from...
Read more >
react-native-maps | Yarn - Package Manager
iOS: #1341 Fix compile error in rn version >= 0.40; iOS: #1194 Add onPress support for Google Maps Polyline; iOS: #1326 Add Marker...
Read more >
Isolation Segment v3.0 Release Notes - VMware Tanzu Docs
Page last updated: December 2, 2022. This topic contains release notes for Isolation Segment v3.0. VMware Tanzu Application Service for VMs ...
Read more >
error: unable to resolve animation metadata node - You.com
I have an ngFor displaying the items in my array. How can display animations onEnter and onLeave every time an element is added...
Read more >
swift - react-native-maps iOS build issues when using ...
Error : ld: 658 duplicate symbols for architecture x86_64 ... node_modules/@react-native-community/cli-platform-ios/native_modules' platform ...
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