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

Dockerfile configuration uses lts image causing server and worker to fail #34

Open
1 of 3 tasks
AIRoboCoder opened this issue Oct 30, 2024 · 0 comments
Open
1 of 3 tasks
Assignees
Labels

Comments

@AIRoboCoder
Copy link

AIRoboCoder commented Oct 30, 2024

Describe the bug

Dockerfile configuration uses an lts image that upgraded node to v22.11.0 causing server and worker to fail:

When running either the auth-express demo or the project in docker the Dockerfile configuration causes the following errors from worker and server regarding uWS.js only supporting up to node LTS version 20:

worker-1 | /usr/src/app/node_modules/uws/uws.js:22
worker-1 | throw new Error('This version of uWS.js supports only Node.js LTS versions 16, 18 and 20 on (glibc) Linux, macOS and Windows, on Tier 1 platforms (https://github.com/nodejs/node/blob/master/BUILDING.md#platform-list).\n\n' + e.toString());
worker-1 | ^
worker-1 |
worker-1 | Error: This version of uWS.js supports only Node.js LTS versions 16, 18 and 20 on (glibc) Linux, macOS and Windows, on Tier 1 platforms (https://github.com/nodejs/node/blob/master/BUILDING.md#platform-list).
worker-1 |
worker-1 | Error: Cannot find module './uws_linux_x64_127.node'
worker-1 | Require stack:
worker-1 | - /usr/src/app/node_modules/uws/uws.js
worker-1 | at /usr/src/app/node_modules/uws/uws.js:22:9
worker-1 | at Object. (/usr/src/app/node_modules/uws/uws.js:24:3)
worker-1 | at Module._compile (node:internal/modules/cjs/loader:1546:14)
worker-1 | at Object..js (node:internal/modules/cjs/loader:1689:10)
worker-1 | at Module.load (node:internal/modules/cjs/loader:1318:32)
worker-1 | at Function._load (node:internal/modules/cjs/loader:1128:12)
worker-1 | at TracingChannel.traceSync (node:diagnostics_channel:315:14)
worker-1 | at wrapModuleLoad (node:internal/modules/cjs/loader:218:24)
worker-1 | at cjsLoader (node:internal/modules/esm/translators:263:5)
worker-1 | at ModuleWrap. (node:internal/modules/esm/translators:196:7)
worker-1 |
worker-1 | Node.js v22.11.0
server-1 | /usr/src/app/node_modules/uws/uws.js:22
server-1 | throw new Error('This version of uWS.js supports only Node.js LTS versions 16, 18 and 20 on (glibc) Linux, macOS and Windows, on Tier 1 platforms (https://github.com/nodejs/node/blob/master/BUILDING.md#platform-list).\n\n' + e.toString());
server-1 | ^
server-1 |
server-1 | Error: This version of uWS.js supports only Node.js LTS versions 16, 18 and 20 on (glibc) Linux, macOS and Windows, on Tier 1 platforms (https://github.com/nodejs/node/blob/master/BUILDING.md#platform-list).
server-1 |
server-1 | Error: Cannot find module './uws_linux_x64_127.node'
server-1 | Require stack:
server-1 | - /usr/src/app/node_modules/uws/uws.js
server-1 | at /usr/src/app/node_modules/uws/uws.js:22:9
server-1 | at Object. (/usr/src/app/node_modules/uws/uws.js:24:3)
server-1 | at Module._compile (node:internal/modules/cjs/loader:1546:14)
server-1 | at Object..js (node:internal/modules/cjs/loader:1689:10)
server-1 | at Module.load (node:internal/modules/cjs/loader:1318:32)
server-1 | at Function._load (node:internal/modules/cjs/loader:1128:12)
server-1 | at TracingChannel.traceSync (node:diagnostics_channel:315:14)
server-1 | at wrapModuleLoad (node:internal/modules/cjs/loader:218:24)
server-1 | at cjsLoader (node:internal/modules/esm/translators:263:5)
server-1 | at ModuleWrap. (node:internal/modules/esm/translators:196:7)
server-1 |
server-1 | Node.js v22.11.0
worker-1 exited with code 1

To Reproduce

Steps to reproduce the behavior:

  1. Run docker compose up --build in project root or in demos/auth-express
  2. Observer docker errorlog

Expected behavior

Run the server and worker without uWS.js version error and not exiting

Proposed Solution

Change in both Dockerfiles the following line

FROM node:lts-alpine3.19

to

FROM node:20.17-alpine3.19

solves the issue.

Environment Information

Node version in lts-alpine.319: v22.11.0
Node version in 20.17-alpine3.19: v20.17.0

Tried this in 2 different environments:
Fedora 39 linux: Docker version 27.3.1, build ce12230
Windows 10: Docker version 27.1.1, build 6312585

Output of npm ls yjs:

@y/[email protected]
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected] deduped
│ ├─┬ [email protected]
│ │ └── [email protected] deduped
│ └── [email protected] deduped
└── [email protected]

Additional context
Curious about a NestJS & TypeScript variant of y-redis

  • I'm a sponsor 💖
  • This issue is a blocker for my project.
  • I considering contributing code to this project
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants