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.
Summary:
Commands are failing on npm 10.7.0 (and Node 20.15.1) when inside a monorepo. Example when building Android:
The culprit seems to be this command, which is called unconditionally when importing
npm.ts
:Test Plan:
Checklist