Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] BREAKING REGRESSION npm concurrency regression in 4.1.0 and onwards #91

Closed
1 task done
jlarmstrongiv opened this issue Jul 8, 2022 · 1 comment · Fixed by #95
Closed
1 task done

[BUG] BREAKING REGRESSION npm concurrency regression in 4.1.0 and onwards #91

jlarmstrongiv opened this issue Jul 8, 2022 · 1 comment · Fixed by #95
Labels
Needs Triage needs an initial review

Comments

@jlarmstrongiv
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When running NPM scripts concurrently, some will fail with errors like:

  • /tmp/ *** .sh: Text file busy
  • Error: ETXTBSY: text file is busy, open '/tmp/ *** .sh'

Expected Behavior

NPM scripts run as expected when run concurrently by using unique filenames.

The current implementation is:

const fileName = escape.filename(`${event}-${Date.now()}`)

Unfortunately, when two scripts run at the same time with the same filename due to Date.now(), NPM will error. Instead, files should be named uniquely. In the NPM cli, this implementation avoids the error:

const rand = require('crypto').randomBytes(4).toString('hex')

Steps To Reproduce

  1. With the latest version of NPM
  2. Run two NPM scripts at the exact same second
  3. Log error

Environment

  • npm: 8.13.2
  • Node: v16.15.0
  • OS: Ubuntu 20.04
  • platform: GitHub Actions
@jlarmstrongiv
Copy link
Contributor Author

Last working NPM version according to #90 is 8.12.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Triage needs an initial review
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant