postinstall script is triggered too soon

Hi I am facing an issue with deploying Nuxt to Cloudflare Pages via Nitro preset. It looks that during the build, Cloudflare trigger another job called "Installing dependencies" immediately when repo is cloned, but then it triggers my postinstall script which call nuxt prepare and it looks that not all deps are already installed at this moment so I am getting an error, especially with Pinia [error] Cannot find module 'pinia/dist/pinia.mjs' In my build command I'set install explicitly pnpm i && pnpm build so how can I prevent to trigger postinstall before my build command is called?
2 Replies
Vero
Vero3y ago
HI @kleinptr, you can’t. Pnpm isn’t natively supported at the moment, and what you’re doing is a workaround. That workaround isn’t perfect, hence this behavior you’re seeing. Either switch package manager or remove the post install script
kleinpetr
kleinpetrOP3y ago
is pnpm on the roadmap? and when I could expect the native support?

Did you find this page helpful?