Like what we’re doing? Star us on GitHub!

PNPM issue with a monorepo setup

DoctorDoc
3 months ago
0

I've just wanted to ask about this here and I figured it out after Googling the solution for a 100th time tonight.



I've had the following error pop up after I've migrated our Payload project to a spankin' new PNPM powered monorepo:


ERROR in ./src/payload.config.ts 17:13-20
Module not found: Error: Can't resolve 'process/browser' in 'C:\Working\codecrew\cms-monorepo\services\cms\src'

ERROR in ./src/payload.config.ts
Cannot read properties of undefined (reading 'module')


The solution was add the following package to the dependencies:


pnpm add--save-dev process
    Open the post
    Continue the discussion in Discord
    Can't find what you're looking for?
    Get help straight from the Payload team with an Enterprise License.Learn More