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

Running two instances of yarn causing issues? #272

Open
ayang21 opened this issue Jan 24, 2024 · 1 comment
Open

Running two instances of yarn causing issues? #272

ayang21 opened this issue Jan 24, 2024 · 1 comment

Comments

@ayang21
Copy link
Contributor

ayang21 commented Jan 24, 2024

Pushkin cli issue #108

@jessestorbeck
Copy link
Contributor

Noting that this is still an occasional issue during install experiment. It seems to happen at random, and the fix is just deleting the particular experiment directory and trying again. I just got the error:

node:internal/errors:862
  const err = new Error(message);
              ^

Error: Command failed: yarn --mutex network install
warning Waiting for the other yarn instance to finish (68792)
warning Waiting for the other yarn instance to finish (68791)
error Couldn't find package "uuid@^9.0.0" required by "pushkin-api@^1.6.0" on the "npm" registry.

    at ChildProcess.exithandler (node:child_process:419:12)
    at ChildProcess.emit (node:events:511:28)
    at maybeClose (node:internal/child_process:1098:16)
    at ChildProcess._handle.onexit (node:internal/child_process:304:5) {
  code: 1,
  killed: false,
  signal: null,
  cmd: 'yarn --mutex network install',
  stdout: 'yarn install v1.22.21\n' +
    '[1/4] Resolving packages...\n' +
    'info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.\n',
  stderr: 'warning Waiting for the other yarn instance to finish (68792)\n' +
    'warning Waiting for the other yarn instance to finish (68791)\n' +
    `error Couldn't find package "uuid@^9.0.0" required by "pushkin-api@^1.6.0" on the "npm" registry.\n`
}

Node.js v20.2.0

Since this happens sporadically, it may be hard to know if we've fixed it, but a simple thing might be trying the --mutex file option instead of --mutex network (https://classic.yarnpkg.com/en/docs/cli/#toc-concurrency-and-mutex).
This may also be related to an error I occasionally get during prep during the worker's docker build:

#9 [4/6] RUN yarn install --production
#9 0.340 yarn install v1.22.19
#9 0.366 [1/4] Resolving packages...
#9 0.387 [2/4] Fetching packages...
#9 3.450 info If you think this is a bug, please open a bug report with the information provided in "/usr/src/app/yarn-error.log".
#9 3.450 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
#9 3.450 error An unexpected error occurred: "https://registry.yarnpkg.com/glob-regex/-/glob-regex-0.3.2.tgz: Socket connection timeout".
#9 ERROR: process "/bin/sh -c yarn install --production" did not complete successfully: exit code: 1
------
 > [4/6] RUN yarn install --production:
0.340 yarn install v1.22.19
0.366 [1/4] Resolving packages...
0.387 [2/4] Fetching packages...
3.450 info If you think this is a bug, please open a bug report with the information provided in "/usr/src/app/yarn-error.log".
3.450 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
3.450 error An unexpected error occurred: "https://registry.yarnpkg.com/glob-regex/-/glob-regex-0.3.2.tgz: Socket connection timeout".
------
Dockerfile:4
--------------------
   2 |     COPY Dockerfile index.js package.json start.sh yarn.lock /usr/src/app/
   3 |     WORKDIR /usr/src/app
   4 | >>> RUN yarn install --production
   5 |     RUN apt-get update && apt-get install -qy netcat dos2unix
   6 |     RUN dos2unix /usr/src/app/start.sh
--------------------
ERROR: failed to solve: process "/bin/sh -c yarn install --production" did not complete successfully: exit code: 1

The package referenced in An unexpected error occurred: "https://registry.yarnpkg.com/glob-regex/-/glob-regex-0.3.2.tgz: Socket connection timeout" changes, but it's always a "Socket connection timeout". The fix for this one is usually running docker system prune; pushkin armageddon and running prep again.

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

No branches or pull requests

2 participants