Skip to content

[rush] When rush performs phased operations, concurrent install autoinstallers may conflict and cause errors. #5684

@LPegasus

Description

@LPegasus

Summary

When rush performs phased operations, concurrent install autoinstallers may conflict and cause errors.

This happened randomly.

Repro steps

  1. Create two projects with a autoinstaller command which registered in command-line.json.
  2. Trigger this autoinstaller command of two projects simultaneously.

Expected result: install autoinstaller step should dedup.

Actual result: Random error. Sometimes, "xxx" module not found. Sometimes "pnpm" not found.

==[ SUCCESS: 3 operations ]====================================================

These operations completed successfully:
  app1 (build)         0.01 seconds
  app1 (type-check)    19.21 seconds
  app2 (build)         0.01 seconds

==[ FAILURE: 1 operation ]=====================================================

--[ FAILURE: app2 (type-check) ]-----------------------------[ 1.65 seconds ]--

/bin/sh: /*/rush-sample-repo/common/temp/pnpm-local/node_modules/.bin/pnpm: No such file or directory

ERROR: Process exited with code 127


Operations failed.

rush type-check (19.29 seconds)
==[ SUCCESS: 3 operations ]====================================================

These operations completed successfully:
  app1 (build)         0.01 seconds
  app1 (type-check)    19.89 seconds
  app2 (build)         0.01 seconds

==[ FAILURE: 1 operation ]=====================================================

--[ FAILURE: app2 (type-check) ]-----------------------------[ 9.26 seconds ]--

node:internal/modules/cjs/loader:1386
  throw err;
  ^

Error: Cannot find module '@ant-design/cssinjs'
Require stack:
- /*/rush-sample-repo/common/autoinstallers/tsc-wrapper/node_modules/.pnpm/antd@6.3.1_react-dom@19.2.4_react@19.2.4/node_modules/antd/lib/theme/internal.js
- /*/rush-sample-repo/common/autoinstallers/tsc-wrapper/node_modules/.pnpm/antd@6.3.1_react-dom@19.2.4_react@19.2.4/node_modules/antd/lib/affix/style/index.js
- /*/rush-sample-repo/common/autoinstallers/tsc-wrapper/node_modules/.pnpm/antd@6.3.1_react-dom@19.2.4_react@19.2.4/node_modules/antd/lib/affix/index.js
- /*/rush-sample-repo/common/autoinstallers/tsc-wrapper/node_modules/.pnpm/antd@6.3.1_react-dom@19.2.4_react@19.2.4/node_modules/antd/lib/index.js
  ...12 lines omitted...
  requireStack: [
    '/*/rush-sample-repo/common/autoinstallers/tsc-wrapper/node_modules/.pnpm/antd@6.3.1_react-dom@19.2.4_react@19.2.4/node_modules/antd/lib/theme/internal.js',
    '/*/rush-sample-repo/common/autoinstallers/tsc-wrapper/node_modules/.pnpm/antd@6.3.1_react-dom@19.2.4_react@19.2.4/node_modules/antd/lib/affix/style/index.js',
    '/*/rush-sample-repo/common/autoinstallers/tsc-wrapper/node_modules/.pnpm/antd@6.3.1_react-dom@19.2.4_react@19.2.4/node_modules/antd/lib/affix/index.js',
    '/*/rush-sample-repo/common/autoinstallers/tsc-wrapper/node_modules/.pnpm/antd@6.3.1_react-dom@19.2.4_react@19.2.4/node_modules/antd/lib/index.js',
    '/*/rush-sample-repo/common/autoinstallers/tsc-wrapper/index.js'
  ]
}

Node.js v22.21.1


Operations failed.

Details

I'll try to do some investigations later.

Standard questions

Please answer these questions to help us investigate your issue more quickly:

Question Answer
@microsoft/rush globally installed version? 5.155.1
rushVersion from rush.json? 5.155.1
pnpmVersion, npmVersion, or yarnVersion from rush.json? pnpm@8.8.0
(if pnpm) useWorkspaces from pnpm-config.json? Yes
Operating system? Mac / Linux
Would you consider contributing a PR? Yes
Node.js version (node -v)? v22.21.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs more infoWe can't proceed because we need a better repro or an answer to a question

    Type

    No type

    Projects

    Status

    Needs triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions