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.

Example project broken on iOS

See original GitHub issue

Just pulled the latest on the repo and it looks like the Example project got broken.

Running react-native run-ios, the bundler crashes with the following output:

Failed to load bundle
(http://localhost:8081/index.ios.bundle?platform=ios&dev=true&minify=false) with error:
(Metro Bundler has encountered an internal error, please check your terminal 
error output for more details (null))

Bundler output says:

error: bundling failed: Error: While trying to resolve module `@react-native-community/slider` 
from file `/Users/jpsaraceno/unbox-ws/react-native-gesture-handler/Example/combo/index.js`, 
the package `/Users/jpsaraceno/unbox-ws/react-native-gesture-handler/Example/node_modules/@react-native-community/slider/package.json` was successfully found. 
However, this package itself specifies a `main` module field that could not be resolved (`/Users/jpsaraceno/unbox-ws/react-native-gesture-handler/Example/node_modules/@react-native-community/slider/index`. 
Indeed, none of these files exist:

  * `/Users/jpsaraceno/unbox-ws/react-native-gesture-handler/Example/node_modules/@react-native-community/slider/index(.native||.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)`
  * `/Users/jpsaraceno/unbox-ws/react-native-gesture-handler/Example/node_modules/@react-native-community/slider/index/index(.native||.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)`
    at ResolutionRequest.resolveDependency (/Users/jpsaraceno/unbox-ws/react-native-gesture-handler/Example/node_modules/metro/src/node-haste/DependencyGraph/ResolutionRequest.js:65:15)
    at DependencyGraph.resolveDependency (/Users/jpsaraceno/unbox-ws/react-native-gesture-handler/Example/node_modules/metro/src/node-haste/DependencyGraph.js:273:16)
    at Object.resolve (/Users/jpsaraceno/unbox-ws/react-native-gesture-handler/Example/node_modules/metro/src/lib/transformHelpers.js:261:42)
    at dependencies.map.result (/Users/jpsaraceno/unbox-ws/react-native-gesture-handler/Example/node_modules/metro/src/DeltaBundler/traverseDependencies.js:391:31)
    at Array.map (<anonymous>)
    at resolveDependencies (/Users/jpsaraceno/unbox-ws/react-native-gesture-handler/Example/node_modules/metro/src/DeltaBundler/traverseDependencies.js:388:18)
    at /Users/jpsaraceno/unbox-ws/react-native-gesture-handler/Example/node_modules/metro/src/DeltaBundler/traverseDependencies.js:261:33
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (/Users/jpsaraceno/unbox-ws/react-native-gesture-handler/Example/node_modules/metro/src/DeltaBundler/traverseDependencies.js:87:24)
    at _next (/Users/jpsaraceno/unbox-ws/react-native-gesture-handler/Example/node_modules/metro/src/DeltaBundler/traverseDependencies.js:107:9)

Last commit log seems to be related:

Remove ViewPager and Slider in favor of exporting createNativeWrapper (#506)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:4
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
osdnkcommented, Mar 20, 2019

@peterkuiper Yes, I fixed it

1reaction
jwheatcommented, Mar 11, 2019

I have this issue as well, just cloned the repo this morning (Mar 11).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix Broken React Native Projects in Xcode 10 - YouTube
In this video we'll learn how to fix an issue where you're unable to build a React Native app in Xcode 10. If...
Read more >
[SOLVED] React Native 0.70.0 iOs fresh project errors out on ...
In case anyone needs a summary of this thread, this problem seems to be a result of version mismatches across a few possible...
Read more >
Image sets from Frameworks broken - Apple Developer
Hi, this is the scenario: I have a framework (my own pod) that defines image sets as assets. They are exported as a...
Read more >
Xcode crashed while renaming project - whole project broken
I wanted to release an app I worked on and quickly change the project name. I usually duplicate projects before doing things like...
Read more >
How to fix the error "The developer of this app needs to update ...
As a security measure, iOS refuses to launch an application with a missing or invalid signature. The signature generated by a build with...
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