'I m getting this error, i run my react native using expo

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)


Solution 1:[1]

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"

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 hwallis