Another suggestion that is probably an even better option is to put this in netlify.toml file, as it is not a “secret variable” and as this step can be easily omitted in case you have to set up a site again.
[build.environment] PNPM_FLAGS = "--shamefully-hoist"
To follow up on this thread, we’ve updated the Nuxt on Netlify documentation to clarify this going forward. Thank you for reporting your concerns.
That’s great!
It’s also worth noting that Nuxt 3 now recommends adding an .npmrc file with shamefully-hoist=true for pnpm deployments.
.npmrc
shamefully-hoist=true
pnpm