I have a react app created with CRA using prismic.io. It used to work but now I keep getting module not found error which I keep fixing by running npm install @prismicio/react @prismicio/client @prismicio/helpers
after which I get the following error:
./node_modules/@prismicio/react/dist/PrismicRichText.js 115:23
Module parse failed: Unexpected token (115:23)
You may need an appropriate loader to handle this file type.
| var img = /* @__PURE__ */jsx("img", {
| src: node.url,
> alt: node.alt ?? void 0,
| "data-copyright": node.copyright ? node.copyright : void 0
| });
Anyone have any idea what to do?
I have tried rm node modules and package-lock and reinstalling everything multiple times with no success.