Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Entry file error in react native from packager

Tags:

react-native

I'm trying to run a react-native project, which works fine on other people's machines, but I'm getting the following error. I've tried doing the following:

  • Clean install of node, npm
  • rerunning npm install and rnpm link

it seems like the path string is being changed to "global code@http://localhost:8081/index.ios.js", but they look fine in the config files.

Looking for JS files in
   /Users/dennisjeong/mobile-bebop/bebopRecruitMobile 

[11:15:00 AM] <START> Building Dependency Graph
[11:15:00 AM] <START> Crawling File System
[Hot Module Replacement] Server listening on /hot

React packager ready.

[11:15:05 AM] <START> request:/index.ios.bundle?platform=ios&dev=true
[11:15:05 AM] <START> find dependencies
[11:15:20 AM] <END>   Crawling File System (19327ms)
[11:15:20 AM] <START> Building in-memory fs for JavaScript
[11:15:20 AM] <END>   Building in-memory fs for JavaScript (213ms)
[11:15:20 AM] <START> Building in-memory fs for Assets
[11:15:20 AM] <END>   Building in-memory fs for Assets (153ms)
[11:15:20 AM] <START> Building Haste Map
[11:15:20 AM] <START> Building (deprecated) Asset Map
[11:15:20 AM] <END>   Building (deprecated) Asset Map (66ms)
[11:15:20 AM] <END>   Building Haste Map (166ms)
[11:15:20 AM] <END>   Building Dependency Graph (19867ms)
transformed 726/726 (100%)
[11:15:21 AM] <END>   find dependencies (16307ms)
[11:15:21 AM] <END>   request:/index.ios.bundle?platform=ios&dev=true (16406ms)
[11:15:21 AM] <START> symbolicate
[11:15:21 AM] <START> find dependencies
[11:15:21 AM] <START> find dependencies
transformed 726/726 (100%)
[11:15:22 AM] <END>   find dependencies (498ms)
NotFoundError: Cannot find entry file global code@http://localhost:8081/index.ios.js in any of the roots: ["/Users/dennisjeong/mobile-bebop/bebopRecruitMobile"]
    at DependencyGraph._getAbsolutePath (/Users/dennisjeong/mobile-bebop/bebopRecruitMobile/node_modules/node-haste/lib/index.js:288:13)
    at /Users/dennisjeong/mobile-bebop/bebopRecruitMobile/node_modules/node-haste/lib/index.js:226:30
    at process._tickCallback (internal/process/next_tick.js:103:7)
[11:15:22 AM] <END>   symbolicate (511ms)
[11:15:22 AM] <START> symbolicate
[11:15:22 AM] <END>   symbolicate (341ms)
like image 722
dennisj Avatar asked Oct 30 '22 01:10

dennisj


1 Answers

Figured out that after updating to RN 0.28 my app is spitting this issue due to incompatible dependencies. This is how I solved this problem

rm -rf node_modules npm cache clean

Then open package.json except react-native change all package versions to *

Then run npm update --save npm update --save-dev

Check package if package.json is updated with version numbers, if not verify from npmjs and update manually

Delete app from the device and try to run again

like image 143
reku Avatar answered Jan 04 '23 15:01

reku