Skip to content

bug: EWORKSPACESCONFIG workspaces config expects an Array in yarn package.json with nohoist #1594

Description

@goleary

Provide environment information

System:
OS: macOS 15.1
CPU: (10) arm64 Apple M2 Pro
Memory: 89.38 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.12.2 - ~/.nvm/versions/node/v20.12.2/bin/node
Yarn: 1.22.19 - ~/Documents/GitHub/andytown/node_modules/.bin/yarn
npm: 10.5.0 - ~/.nvm/versions/node/v20.12.2/bin/npm
pnpm: 9.10.0 - ~/Library/pnpm/pnpm
Watchman: 2024.09.09.00 - /opt/homebrew/bin/watchman

Describe the bug

In a project with a valid yarn packages.json that has a valid workspaces config:

  "workspaces": {
    "nohoist": [
      "react"
    ]
  },

an error is produced when try to run trigger dev

Reproduction repo

below

To reproduce

  1. create new a new trigger project
  2. Add workspaces object as below
  ...
  "workspaces": {
    "nohoist": [
      "react"
    ]
  },
  ...
}
  1. run npx trigger.dev@latest dev

error=>

npm ERR! code EWORKSPACESCONFIG
npm ERR! workspaces config expects an Array

Additional information

Would be sweet if y'all provided a template stackblitz/codesandbox in this issue template for augmentation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions