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.

react-native-gifted-chat\node_modules\expo\AppEntry.js not found

See original GitHub issue

Issue Description

When intsalling the last version of gifted chat (0.9.*) i have an error at metro launch. Herer is the error :

error: bundling failed: Error: While trying to resolve module react-native-gift ed-chat from file C:\Users\nount\WebstormProjects\daate\src\screens\user\showP rofile4.js, the package C:\Users\nount\WebstormProjects\daate\node_modules\rea ct-native-gifted-chat\package.json was successfully found. However, this packag e itself specifies a main module field that could not be resolved (C:\Users\n ount\WebstormProjects\daate\node_modules\react-native-gifted-chat\node_modules\e xpo\AppEntry.js. Indeed, none of these files exist:

  • C:\Users\nount\WebstormProjects\daate\node_modules\react-native-gifted-chat \node_modules\expo\AppEntry.js(.native||.android.js|.native.js|.js|.android.json |.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)
  • C:\Users\nount\WebstormProjects\daate\node_modules\react-native-gifted-chat \node_modules\expo\AppEntry.js\index(.native||.android.js|.native.js|.js|.androi d.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.t sx) at ResolutionRequest.resolveDependency (C:\Users\nount\WebstormProjects\daat e\node_modules\metro\src\node-haste\DependencyGraph\ResolutionRequest.js:65:15) at DependencyGraph.resolveDependency (C:\Users\nount\WebstormProjects\daate\ node_modules\metro\src\node-haste\DependencyGraph.js:283:16) at Object.resolve (C:\Users\nount\WebstormProjects\daate\node_modules\metro\ src\lib\transformHelpers.js:261:42) at dependencies.map.result (C:\Users\nount\WebstormProjects\daate\node_modul es\metro\src\DeltaBundler\traverseDependencies.js:399:31) at Array.map (<anonymous>) at resolveDependencies (C:\Users\nount\WebstormProjects\daate\node_modules\m etro\src\DeltaBundler\traverseDependencies.js:396:18) at C:\Users\nount\WebstormProjects\daate\node_modules\metro\src\DeltaBundler \traverseDependencies.js:269:33 at Generator.next (<anonymous>) at asyncGeneratorStep (C:\Users\nount\WebstormProjects\daate\node_modules\me tro\src\DeltaBundler\traverseDependencies.js:87:24) at _next (C:\Users\nount\WebstormProjects\daate\node_modules\metro\src\Delta Bundler\traverseDependencies.js:107:9) ::1 - - [12/Jun/2019:12:19:02 +0000] “GET /index.delta?platform=android&dev=true &minify=false&revisionId=ac05c803b916d881 HTTP/1.1” 500 - “http://localhost:8081 /debugger-ui/” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KH TML, like Gecko) Chrome/74.0.3729.169 Safari/537.36” DELTA [android, dev] ./index.js ▓▓░░░░░░░░░░░░░░ 18.5% (186/518), failed.

::1 - - [12/Jun/2019:12:20:35 +0000] “GET /index.delta?platform=android&dev=true &minify=false HTTP/1.1” 500 - “http://localhost:8081/debugger-ui/” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0 .3729.169 Safari/537.36” error: bundling failed: Error: While trying to resolve module react-native-gift ed-chat from file C:\Users\nount\WebstormProjects\daate\src\screens\user\showP rofile4.js, the package C:\Users\nount\WebstormProjects\daate\node_modules\rea ct-native-gifted-chat\package.json was successfully found. However, this packag e itself specifies a main module field that could not be resolved (C:\Users\n ount\WebstormProjects\daate\node_modules\react-native-gifted-chat\node_modules\e xpo\AppEntry.js. Indeed, none of these files exist:

  • C:\Users\nount\WebstormProjects\daate\node_modules\react-native-gifted-chat \node_modules\expo\AppEntry.js(.native||.android.js|.native.js|.js|.android.json |.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)
  • C:\Users\nount\WebstormProjects\daate\node_modules\react-native-gifted-chat \node_modules\expo\AppEntry.js\index(.native||.android.js|.native.js|.js|.androi d.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.t sx) at ResolutionRequest.resolveDependency (C:\Users\nount\WebstormProjects\daat e\node_modules\metro\src\node-haste\DependencyGraph\ResolutionRequest.js:65:15) at DependencyGraph.resolveDependency (C:\Users\nount\WebstormProjects\daate\ node_modules\metro\src\node-haste\DependencyGraph.js:283:16) at Object.resolve (C:\Users\nount\WebstormProjects\daate\node_modules\metro\ src\lib\transformHelpers.js:261:42) at dependencies.map.result (C:\Users\nount\WebstormProjects\daate\node_modul es\metro\src\DeltaBundler\traverseDependencies.js:399:31) at Array.map (<anonymous>) at resolveDependencies (C:\Users\nount\WebstormProjects\daate\node_modules\m etro\src\DeltaBundler\traverseDependencies.js:396:18) at C:\Users\nount\WebstormProjects\daate\node_modules\metro\src\DeltaBundler \traverseDependencies.js:269:33 at Generator.next (<anonymous>) at asyncGeneratorStep (C:\Users\nount\WebstormProjects\daate\node_modules\me tro\src\DeltaBundler\traverseDependencies.js:87:24) at _next (C:\Users\nount\WebstormProjects\daate\node_modules\metro\src\Delta Bundler\traverseDependencies.js:107:9) DELTA [android, dev] ./index.js ░░░░░░░░░░░░░░░░ 0.0% (0/1), failed.

Steps to Reproduce / Code Snippets

Install the last version of gifted chat (0.9.*), then try to launch your app

Expected Results

Have gifted chat working

Additional Information

  • Nodejs version: 10.16.0
  • React version: 16.8.3
  • React Native version: 0.59.8
  • react-native-gifted-chat version: 0.9.3
  • Platform(s) (iOS, Android, or both?): Both

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:16

github_iconTop GitHub Comments

2reactions
nadav2051commented, Jul 4, 2019

I have no idea why this has been closed, or it’s perceived as not being related related to this library.

@tmjordan, I’ve also faced the same issue, it appears like the contents of the published version of gifted-chat is different than the version you fork, and this is because npm runs a prepublishing process (https://docs.npmjs.com/misc/scripts) before actually publishing it, I’ve been managed to get my fork to work this way: On my main application, I’ve added the following postinstall script:

"scripts": { "postinstall": "cd node_modules/react-native-gifted-chat && yarn install && yarn lint && yarn build && yarn config:npm && rm -rf node_modules" },

1reaction
roshangm1commented, Jan 15, 2020

yarn build is failing because of warning/erros while compiling with tsc. How do you make sure, build is successful ? I am not using typescript in my project. I am trying to use my own fork. image

Read more comments on GitHub >

github_iconTop Results From Across the Web

While running ReactiNative project index.js not found error occur
I tried to remove the node-module folder and install it again but still not got success. React Native Version: 0.59.2. enter image description ......
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