Open cichy3000 opened 3 months ago
Hey @cichy3000 did you figure this out? I haven't seen the same problem with my build, but I have some ideas.
Have you tried resetting your node_modules, clearing the npm cache and running the build again?
rm -rf node_modules
npm cache clean --force
Also, consider updating vite to the latest version.
@cichy3000 are you still having this issue?
Hey community, maybe you can give me a hint. when working with dev build there are no problems - all works like a charm -> pdfs are generated π but whenever I try to compile a production package I get an error as below regarding css-tree and JSON parsing π«£
I will be grateful for any help π€
removing the {htmlFromMarkdown} line and uninstalling the "react-pdf-html" (while "@react-pdf/renderer" is left in app) makes prod build working but doesn't do the trick as I still need to include raw html in render process
error details when using the
npm run build
=tsc && vite build
vite v5.0.12 building for production...
β 2438 modules transformed.
[commonjs--resolver] Failed to parse JSON file.
file: C:/git/client/node_modules/css-tree/lib/index.js
error during build:
RollupError: Failed to parse JSON file. at error (file:///C:/git/client/node_modules/rollup/dist/es/shared/parseAst.js:337:30) at Object.error (file:///C:/git/client/node_modules/rollup/dist/es/shared/node-entry.js:18507:20) at Object.error (file:///C:/git/client/node_modules/rollup/dist/es/shared/node-entry.js:17616:42) at Object.transform (file:///C:/git/client/node_modules/vite/dist/node/chunks/dep-9A4-l-43.js:41672:22) at file:///C:/git/client/node_modules/rollup/dist/es/shared/node-entry.js:18692:40
tsconfig.json:
react component: