Nuxt 3 Deploy Failed: Rollup failed to resolve import "vue"

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"
1 Like

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.

1 Like

That’s great!

It’s also worth noting that Nuxt 3 now recommends adding an .npmrc file with shamefully-hoist=true for pnpm deployments.

1 Like