Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

PNPM issue with a monorepo setup

default discord avatar
DoctorDoc2 years ago

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
    Star on GitHub

    Star

    Chat on Discord

    Discord

    online

    Can't find what you're looking for?

    Get dedicated engineering support directly from the Payload team.