Next.js pnpm Support
If you’re planning to use pnpm with Next.js to manage dependencies, you must do one of the following:
-
Set a
PNPM_FLAGSenvironment variable with a value of--shamefully-hoist. This appends a--shamefully-hoistargument to thepnpm installcommand that Netlify runs. -
Enable public hoisting by adding an
.npmrcfile in the root of your project with this content:public-hoist-pattern[]=*
Learn more about using pnpm on Netlify.
Did you find this doc useful?
Your feedback helps us improve our docs.