Skip to content

Conversation

@tido64
Copy link
Contributor

@tido64 tido64 commented Jul 15, 2024

Summary:

Commands are failing on npm 10.7.0 (and Node 20.15.1) when inside a monorepo. Example when building Android:

Error executing command '[node, npm error code ENOWORKSPACES
npm error This command does not support workspaces.

npm error A complete log of this run can be found in: ~/.npm/_logs/2024-07-15T08_41_45_432Z-debug-0.log
/~/node_modules/@react-native-community/cli/build/bin.js, config, --platform, android]': Command '[node, npm error code ENOWORKSPACES
npm error This command does not support workspaces.

npm error A complete log of this run can be found in: ~/.npm/_logs/2024-07-15T08_41_45_432Z-debug-0.log
/~/node_modules/@react-native-community/cli/build/bin.js, config, --platform, android]' failed with exit code 1.

The culprit seems to be this command, which is called unconditionally when importing npm.ts:

% npm config get registry
npm error code ENOWORKSPACES
npm error This command does not support workspaces.

Test Plan:

node -p 'require("@react-native-community/cli").bin'

Checklist

  • Documentation is up to date to reflect these changes.
  • Follows commit message convention described in CONTRIBUTING.md

Copy link
Collaborator

@szymonrybczak szymonrybczak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏

@thymikee thymikee requested a review from blakef July 15, 2024 12:33
@thymikee thymikee merged commit 5e28dea into react-native-community:main Jul 15, 2024
@tido64 tido64 deleted the tido/fix-ENOWORKSPACES branch July 15, 2024 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants