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

fix ERR_SOCKET_TIMEOUT by matching npm version #1551

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

antigenius0910
Copy link

This PR should fix #786

I encounter the same problem from #786, and I am using Mac with docker and local node version v18.20.2. I keep seeing npm WARN EBADENGINE current: { node: 'v19.9.0', npm: '9.6.3' } which I knew was not the one I have config on local.

The root cause seem to be from node version definition here
https://github.com/antigenius0910/AgentGPT/blob/main/next/package.json#L6

which conflict with frontend docker file base image definition
https://github.com/antigenius0910/AgentGPT/blob/main/next/Dockerfile#L2

this combination will produce below error

> [frontend  5/10] RUN npm ci:
3.526 npm WARN EBADENGINE Unsupported engine {
3.526 npm WARN EBADENGINE   package: 'agent-gpt@1.0.0',
3.527 npm WARN EBADENGINE   required: { node: '>=18.0.0 <19.0.0' },
3.528 npm WARN EBADENGINE   current: { node: 'v19.9.0', npm: '9.6.3' }
3.529 npm WARN EBADENGINE }
26.91 npm notice
26.91 npm notice New major version of npm available! 9.6.3 -> 10.7.0
26.91 npm notice Changelog: <https://github.com/npm/cli/releases/tag/v10.7.0>
26.91 npm notice Run `npm install -g npm@10.7.0` to update!
26.91 npm notice
26.92 npm ERR! code ERR_SOCKET_TIMEOUT
26.92 npm ERR! network Socket timeout
26.92 npm ERR! network This is a problem related to network connectivity.
26.92 npm ERR! network In most cases you are behind a proxy or have bad network settings.
26.92 npm ERR! network
26.92 npm ERR! network If you are behind a proxy, please make sure that the
26.92 npm ERR! network 'proxy' config is set properly.  See: 'npm help config'
26.94
26.94 npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-05-14T05_40_37_022Z-debug-0.log
------
failed to solve: process "/bin/sh -c npm ci" did not complete successfully: exit code: 1

simply change base image from node:19-alpine to node:18-alpine and ran ./setup.sh once again and everything start up correctly this time

[+] Running 2/5
 ✔ Network agentgpt_default       Created                                                                                                  0.1s
 ✔ Volume "agentgpt_agentgpt_db"  Created                                                                                                  0.0s
 ⠦ Container frontend             Created                                                                                                  5.6s
 ⠦ Container agentgpt_db          Created                                                                                                  5.6s
 ⠼ Container platform             Created                                                                                                  5.4s

frontend     | https://nextjs.org/telemetry
frontend     |
frontend     |   ▲ Next.js 13.5.6
frontend     |   - Local:        http://localhost:3000
frontend     |   - Environments: .env
frontend     |
frontend     |  ✓ Ready in 2.8s

Copy link

vercel bot commented May 14, 2024

@privateeyemark is attempting to deploy a commit to the reworkd Team on Vercel.

A member of the Team first needs to authorize it.

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.

Setup.sh does not work with ubuntu 22.04 and node v18.16.0
2 participants