Error creating new function with latest CLI version

I created a brand new extension only app, on the latest cli version, and I’m unable to generate any new function extension. UI extensions work, functions all give me the following error. I saw an old post of someone saying to init the app with npm as the package manager but that didn’t help.

? Type of extension?
:check_mark: Cart transformer
? Name your extension:
:check_mark: fn-cart-transform

? What would you like to work in?
:check_mark: TypeScript

── external error ──────────────────────────────────────────────────────────────────────────────────────

Error coming from pnpm install

Command failed with exit code 1: pnpm install
Scope: all 4 workspace projects
✓ Lockfile passes supply-chain policies (verified 9m ago)
Progress: resolved 1, reused 0, downloaded 0, added 0
Progress: resolved 206, reused 205, downloaded 0, added 0
[WARN] 2 deprecated subdependencies found: @graphql-tools/prisma-loader@8.0.17, node-domexception@1.0.0
Progress: resolved 431, reused 381, downloaded 0, added 0
Packages: +349 -1
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++±
Progress: resolved 431, reused 381, downloaded 0, added 0, done

[ERR_PNPM_IGNORED_BUILDS] Ignored build scripts: core-js@3.50.0, esbuild@0.28.2

Run “pnpm approve-builds” to pick which dependencies should be allowed to run scripts.

────────────────────────────────────────────────────────────────────────────────────────────────────────

Following up with pnpm approve-builds, then results in the following error when trying again:

── external error ──────────────────────────────────────────────────────────────

Error coming from pnpm exec graphql-code-generator --config package.json

Command failed with exit code 1: pnpm exec graphql-code-generator --config package.json
undefined
[ERR_PNPM_RECURSIVE_EXEC_FIRST_FAIL] Command “graphql-code-generator” not found

────────────────────────────────────────────────────────────────────────────────

I deleted pnpm-lock.yaml and pnpm-workspace.yaml from the root and it works fine. Not sure why Shopify creates those files but that was the culprit, even when generating the app with npm set as package manager.