Skip to content

Error: Command failed: npm config --location=project set legacy-peer-deps=true #3212

@onyedikachi23

Description

@onyedikachi23

I'm using turborepo (a monorepo framework) and npm, and I'm trying to run the command npx gluestack-ui add menu in my ./apps/mobile package, but end up with this error:

npm error code ENOWORKSPACES
npm error This command does not support workspaces.
npm error A complete log of this run can be found in: /home/onyedikachi23/.npm/_logs/2025-09-17T05_28_35_671Z-debug-0.log
│
■  Error: Command failed: npm config --location=project set legacy-peer-deps=true

I guessed it was trying to set the legacy-peer-deps=true flag, so I manually added it in the .npmrc files at the project root and inside the ./apps/mobile, but the error persisted.

Please note that the cli commands were working fine when I haven't moved the project to a monorepo structure.

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