Number of issues here:
Changing jsBundleURLForBundleRoot:@"index" to jsBundleURLForBundleRoot:@"packages/mobile/index" leads to resolution errors
Leaving it as it is, leads to @babel/runtime/helpers/interopRequireDefault does not exist in the Haste module map. It looks like the packages/mobile/index reference is the way to go but that the react-native command uses packages/mobile as the ref location instead of the project root. From the root I tried two commands (RN 0.59):
In both cases, I get "Unable to resolve module ./packages/mobile/index from /Users/me/projects/rnw/packages/mobile/.
[...]
`Indeed, none of these files exist:
Current solution is to set --projectRoot ../../ at the package.json start script instead of metro.config.js, like it used to be before. Not sure if it's a bug or not.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Number of issues here:
Changing
jsBundleURLForBundleRoot:@"index"
tojsBundleURLForBundleRoot:@"packages/mobile/index"
leads to resolution errorsLeaving it as it is, leads to
@babel/runtime/helpers/interopRequireDefault does not exist in the Haste module map
. It looks like the packages/mobile/index reference is the way to go but that the react-native command uses packages/mobile as the ref location instead of the project root. From the root I tried two commands (RN 0.59):mobile: start => ../../node_modules/.bin/react-native start --reset-cache
root: start => cd ./packages/mobile && yarn start
root: start => yarn workspace mobile start
In both cases, I get "Unable to resolve module
./packages/mobile/index
from/Users/me/projects/rnw/packages/mobile/.
[...]
`Indeed, none of these files exist:
/Users/me/projects/rnw/packages/mobile/packages/mobile/index
Notice the duplicate packages/mobile reference
Ok, I identified the problem. The
packages/mobile/metro.config.js
is not processed. The projectRoot remainspackages/mobile
instead of ``Hi,
I'm facing the same problem. Did you manage to solve why the
metro.config.js
wasn't processed?Current solution is to set
--projectRoot ../../
at thepackage.json
start script instead ofmetro.config.js
, like it used to be before. Not sure if it's a bug or not.