Android Bundling failed while trying to resolve module `react-merge-refs`
alexandre-eliot opened this issue ยท 3 comments
alexandre-eliot commented
๐ Bug Report
Android Bundling fails whilst I am trying to use react-merge-refs
to merge refs in a react-native component.
To Reproduce
npm install react-merge-refs
npm start
- Run the expo-app
Expected behavior
I am trying to use react-merge-refs
to merge refs in a react-native component
Link to repl or repo (highly encouraged)
Android Bundling failed 7435ms
While trying to resolve module `react-merge-refs` from file `[project_directory]\components\SecurityCode\SecurityCode.js`, the package `[project_directory]\node_modules\react-merge-refs\package.json` was successfully found. However, this package itself specifies a `main` module field that could not be resolved (`[project_directory]\node_modules\react-merge-refs\index`. Indeed, none of these files exist:
* [project_directory]\node_modules\react-merge-refs\index(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json|.android.svg|.native.svg|.svg)
* [project_directory]\node_modules\react-merge-refs\index\index(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json|.android.svg|.native.svg|.svg)
Result of npx envinfo --system --binaries --npmPackages react-merge-refs,react,react-dom --markdown --clipboard
## System:
- OS: Windows 10 10.0.22000
- CPU: (4) x64 Intel(R) Core(TM) i5-7300HQ CPU @ 2.50GHz
- Memory: 3.38 GB / 15.86 GB
## Binaries:
- Node: 14.19.0 - C:\Program Files\nodejs\node.EXE
- npm: 6.14.16 - C:\Program Files\nodejs\npm.CMD
## npmPackages:
- react: 17.0.1 => 17.0.1
- react-dom: 17.0.1 => 17.0.1
- react-merge-refs: ^2.0.1 => 2.0.1
Footnotes
Using function from the source code by itself works fine
gregberge commented
Hello @alexandre-eliot, this package is ESM only, the Android building you use probably does not support ESM yet.
alexandre-eliot commented
Oh, alright then
Thank you for your fast response anyway !
ddikodroid commented
Oh, alright then Thank you for your fast response anyway !
have you found the other package that has the same functionality?