I have a Lerna MonoRepo project setup.
Like
root/
lerna.json
packgae.json
package.lock.json
packages/
app1 - Create react app (with firebase sdk dependency)
app2 - Next Js app (with firebase-admin dependency)
components - shared react components.
when I try to build next js app then following error occurs.
Blockquote ModuleNotFoundError: Module not found: Error: Can't resolve 'fs' in 'root-project/node_modules/firebase-admin/lib'.
firebase-admin
in server-only code (e.g.getStaticProps
,getServerSideProps
, API routes). – Finished