PNPM monorepo nextjs application throw next server not found on reload

Hey there,

We were trying to deploy a nextjs application in pnpm workspace.

My config right now in ui

Base dir: “”
Build Command: pnpm --filter web build
Publish Directory: apps/web/.next/

I have also installed nextjs plugin runtime.

Build is successfull and i am able to get the site also. But the issue is when ever i reload other than home page I get a crashed netlify message that states:

Error - Could not find Next.js server

Has someone faced this issue before. Kindly need your help. I have went through previous topics and none helped to solve this.

Github Repo: GitHub - tinkerhub/platform: A tinkerhub platform for all Tinkerhub related activities
Project URL:

Like try to reload auth / tinkerhub causes this message

Could you try using --shamefully-hoist as the value of PNPM_FLAGS environment variable? A few folks have complained about some missing dependencies when using pnpm and they had to use this option.

1 Like

Hey there.

Thank you so much for that. It was the answer. Now it works quite fine.

1 Like

Thanks for coming back and letting us know! Glad everything is working now. Happy building :rocket: