-
-
Notifications
You must be signed in to change notification settings - Fork 18
Backend up npm libs #1593
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
Backend up npm libs #1593
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,24 +1,24 @@ | ||||||
| FROM node:22-alpine AS builder | ||||||
| FROM node:24-alpine AS builder | ||||||
|
|
||||||
| WORKDIR /app | ||||||
|
|
||||||
| COPY package.json yarn.lock ./ | ||||||
| RUN yarn install --frozen-lockfile | ||||||
| RUN yarn install | ||||||
|
||||||
|
|
||||||
| COPY tsconfig.json ./ | ||||||
| COPY src ./src | ||||||
|
|
||||||
| RUN yarn build | ||||||
|
|
||||||
| FROM node:22-alpine | ||||||
| FROM node:24-alpine | ||||||
|
|
||||||
| WORKDIR /app | ||||||
|
|
||||||
| RUN addgroup -g 1001 -S nodejs && \ | ||||||
| adduser -S nodejs -u 1001 | ||||||
|
|
||||||
| COPY package.json yarn.lock ./ | ||||||
| RUN yarn install --frozen-lockfile --production && yarn cache clean | ||||||
| RUN yarn install --production && yarn cache clean | ||||||
|
||||||
| RUN yarn install --production && yarn cache clean | |
| RUN yarn install --production --frozen-lockfile && yarn cache clean |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,16 +12,16 @@ | |
| }, | ||
| "dependencies": { | ||
| "@hono/node-server": "^1.19.9", | ||
| "hono": "^4.11.7", | ||
| "hono": "^4.11.9", | ||
| "jsonwebtoken": "^9.0.3", | ||
| "lru-cache": "^11.2.5", | ||
| "lru-cache": "^11.2.6", | ||
| "nanoid": "^5.1.6", | ||
| "pino": "^10.3.0", | ||
| "pino": "^10.3.1", | ||
| "ws": "^8.19.0", | ||
| "zod": "^4.3.6" | ||
| }, | ||
| "devDependencies": { | ||
| "@biomejs/biome": "2.3.13", | ||
| "@biomejs/biome": "2.3.14", | ||
|
Comment on lines
13
to
+24
|
||
| "@types/jsonwebtoken": "^9.0.10", | ||
| "@types/node": "^22.10.2", | ||
| "@types/ws": "^8.18.1", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Docker build context only copies package.json and yarn.lock, but this yarn.lock is Yarn Berry-style (has
__metadata). Without copying a.yarnrc.yml/.yarn(or usingcorepack+ apackageManagerfield),yarn installmay run Yarn classic and fail to parse the lockfile or install with the wrong linker (PnP vs node-modules). Pin and activate the intended Yarn version and ensure node-modules linking for runtime resolution.