PNPM + Netlify deploy doesn't work

When trying to deploy a very simple project to Netlify using netlify-cli deploy and PNPM it seems the dependencies don’t get installed.

I get the following error:
Cannot find package '@libsql/client' imported from [...]


You can also see that here: https://6635554b2e909556f29f94d2--venerable-scone-e38e3d.netlify.app/

Here’s the deploy logs. All the steps are skipped except “Post-processing”:

4:21:24 PM: Starting post processing
4:21:24 PM: Post processing done
4:21:24 PM: Section completed: postprocessing
4:21:24 PM: Skipping form detection
4:21:24 PM: Post processing - header rules
4:21:24 PM: Post processing - redirect rules
4:21:25 PM: Site is live ✨

Here’s a minimum reproduction of the issue: GitHub - SunFlea/netlify-pnpm-bug: minimum reproduction
Run:

git clone https://github.com/SunFlea/netlify-pnpm-bug
cd netlify-pnpm-bug
pnpm install
netlify deploy

The problem goes away when using npm install instead. Netlify claims PNPM is supported both in a blog post and in the docs. So I don’t know what the issue is.

Thanks.

Have you added shamefully-hoist=true to .npmrc?

Yes, I’ve tried that and it doesn’t make a difference.

I just tried your repo and it appears to work fine: Invocation Failed (6637d3f7c26282127fe888c6–f-117757.netlify.app)

(I get a different error from your dependency but that’s an indication that the dependency is being imported fine).

I only tried with shamefully-hoist, did not try without it.

Did you deploy manually using the commands in my original post or are you deploying via GitHub?
Because it seems to work when deploying via GitHub but not manually when using commands.

Yeah, I’ve made a single deploy via the CLI: