Attempting to migrate a project to pnpm and vite which successfully used @react-pdf/renderer a year ago. You can see the stable version using npm and nextjs at https://cefn.com/cv
I had to upgrade to 3.0.0 owing to issues in version 2 like this one and this one
However, now an attempt to run tsc && vite build leads to the following fatal error - both lines are source code which I believe comes through dependencies from @react-pdf/renderer@3.0.0
✘ [ERROR] The symbol "Buffer" has already been declared
node_modules/.pnpm/@react-pdf+png-js@2.2.0/node_modules/@react-pdf/png-js/lib/png-js.browser.es.js:6952:4:
6952 │ var Buffer = safeBuffer.exports.Buffer;
╵ ~~~~~~
The symbol "Buffer" was originally declared here:
node_modules/.pnpm/@react-pdf+png-js@2.2.0/node_modules/@react-pdf/png-js/lib/png-js.browser.es.js:2:16:
2 │ import { Buffer } from 'buffer';
╵ ~~~~~~
/home/cefn/Documents/github/cvvite/node_modules/.pnpm/esbuild@0.15.12/node_modules/esbuild/lib/main.js:1566
let error = new Error(`${text}${summary}`);
^
Error: Build failed with 1 error:
Attempting to migrate a project to
pnpmandvitewhich successfully used@react-pdf/renderera year ago. You can see the stable version usingnpmandnextjsat https://cefn.com/cvI had to upgrade to 3.0.0 owing to issues in version 2 like this one and this one
However, now an attempt to run
tsc && vite buildleads to the following fatal error - both lines are source code which I believe comes through dependencies from@react-pdf/renderer@3.0.0