1

While trying to resolve module idb from file `

C:\Users\chouk\OneDrive\Bureau\my-app\node_modules\@firebase\app\dist\esm\index.esm2017.js

, the package C:\Users\chouk\OneDrive\Bureau\my-app\node_modules\idb\package.json was successfully found. However, this package itself specifies a main module field that could not be resolved (C:\Users\chouk\OneDrive\Bureau\my-app\node_modules\idb\build\index.cjs. Indeed, none of these files exist:

  • C:\Users\chouk\OneDrive\Bureau\my-app\node_modules\idb\build\index.cjs(.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)
  • C:\Users\chouk\OneDrive\Bureau\my-app\node_modules\idb\build\index.cjs\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)
Green
  • 130
  • 1
  • 10
Marouane
  • 11
  • 2
  • Just restart the bundler, and try again – Vivek K J May 08 '22 at 12:12
  • I restart the bundler, but i get the same problem, when i remove this line : import { getAuth, sendPasswordResetEmail} from "firebase/auth"; i get no error. – Marouane May 08 '22 at 12:22
  • Try to remove and add the firebase package again with `npm` or `yarn`. – Fasani May 09 '22 at 09:00
  • solved the my issue with this: https://stackoverflow.com/questions/72179070/react-native-bundling-failure-error-message-while-trying-to-resolve-module-i – Jafeth Yahuma Oct 08 '22 at 14:05

1 Answers1

0

I hit this exact issue and "fixed" it by downgrading the firebase dependency to 9.7.0 (it was previously 9.8.1)

You can do that by editing the firebase entry in the dependencies section of package.json to be "9.7.0"

hwallis
  • 1
  • 2