Cannot get final name for export 'Observable' of __barrel_optimize__

223 Views Asked by At

I've started experiencing these issues after adding Sanity to my Next.js/Typescript app.

Cannot get final name for export 'Observable' of __barrel_optimize__?names=Observable,lastValueFrom!=!./node_modules/rxjs/dist/esm5/index.js

This is probably related to some issue with Next.js optimizePackageImports feature and the way the imports are done in the @sanity/client package.

Similar issue here: https://github.com/vercel/next.js/issues/55818

Is there any known workaround to solve this? Thanks :)

"@sanity/client": "^6.9.1",
"next-sanity": "^7.0.1",

UPDATE

Downgrading to next-sanity: 3.1.9 temporarily solved the build issue for me.

0

There are 0 best solutions below