Can't create Shopify app in project using pnpm workspaces

I’m trying to create a new Shopify app following the Create an app instructions in a repo using pnpm workspaces. The app fails to install dependencies when running pnpm dev. I’ve tried installing many different ways, but all of the errors have to do with the way the Shopify CLI tries to install while running the dev script, seemingly with both NPM and PNPM. It always fails on dependencies specifying workspace:* as the version.

Here’s another example of an error:

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

Error coming from `pnpm install`

Command failed with exit code 1: pnpm install
Scope: all 7 workspace projects
 ENOENT  ENOENT: no such file or directory, unlink 
'/Users/

^ Unlinking and re-installing babel/core leads to a chain of new errors involving installation.

**Steps to reproduce**
Easiest way to recreate the errors is to create a new monorepo with Turbo repo ([guide](https://turbo.build/repo/docs))

```css
npx create-turbo@latest

Then in the apps directory create a new Shopify app (guide)

pnpm create /app

Even though the Shopify CLI appears to support PNPM, this seems like a significant limitation and goes against emerging best practices for JS/TS application development as it prevents code sharing between projects. Any help resolving would be extremely appreciated.

I encountered this as well. The cli doesn’t seem to install dependencies in a way that is compatible with pnpm workspaces. Fortunately there is an option to skip dependency installs when running shopify dev or shopify build: --skip-dependencies-installation.

So, as a workaround, I have this in my Shopify app’s workspace within my monorepo:

// packages/shopify/package.json:
{
  ...
  "packageManager": "pnpm@7.29.0",
  "scripts": {
    "build": "pnpm install && shopify app build --skip-dependencies-installation",
    "dev": "pnpm install && shopify app dev --skip-dependencies-installation"
  }
  ...
}