mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-01-23 10:45:27 +00:00
Switch back to node 24, switch to npm for building frontend. Remove node_modules before starting frontend build. Fixes bug with NPM
This commit is contained in:
parent
0e6889c6c1
commit
9da20b1941
3 changed files with 784 additions and 189 deletions
|
|
@ -4,22 +4,16 @@ ARG REPO_NAME=dispatcharr
|
|||
ARG BASE_TAG=base
|
||||
|
||||
# --- Build frontend ---
|
||||
FROM node:20 AS frontend-builder
|
||||
|
||||
# Make builds platform-aware for buildx caching and optional native deps
|
||||
ARG TARGETPLATFORM
|
||||
FROM node:24 AS frontend-builder
|
||||
WORKDIR /app/frontend
|
||||
COPY frontend/package*.json ./
|
||||
# include platform marker so install layer is different per platform
|
||||
RUN echo "platform=${TARGETPLATFORM:-$(uname -m)}" > .platform
|
||||
RUN npm ci --prefer-offline --no-audit --unsafe-perm || (rm -rf node_modules package-lock.json && npm install --unsafe-perm)
|
||||
|
||||
# Ensure platform-specific optional native modules are present (rebuild or reinstall if necessary)
|
||||
RUN npm rebuild || (rm -rf node_modules package-lock.json && npm install --unsafe-perm)
|
||||
|
||||
COPY frontend/ ./
|
||||
RUN npm run build
|
||||
RUN rm -rf node_modules .cache
|
||||
COPY ./frontend /app/frontend
|
||||
RUN set -eux; \
|
||||
# remove any node_modules that may have been copied from the host (x86)
|
||||
rm -rf node_modules || true; \
|
||||
npm install --no-audit --progress=false; \
|
||||
npm run build; \
|
||||
rm -rf node_modules .cache
|
||||
|
||||
# --- Redeclare build arguments for the next stage ---
|
||||
ARG REPO_OWNER
|
||||
|
|
|
|||
930
frontend/package-lock.json
generated
930
frontend/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "vite",
|
||||
"name": "frontend",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
|
|
@ -24,14 +24,14 @@
|
|||
"@mantine/hooks": "~8.0.1",
|
||||
"@mantine/notifications": "~8.0.1",
|
||||
"@tanstack/react-table": "^8.21.2",
|
||||
"allotment": "^1.20.3",
|
||||
"allotment": "^1.20.4",
|
||||
"dayjs": "^1.11.13",
|
||||
"formik": "^2.4.6",
|
||||
"hls.js": "^1.5.20",
|
||||
"lucide-react": "^0.511.0",
|
||||
"mpegts.js": "^1.8.0",
|
||||
"react": "^19.0.0",
|
||||
"react-dom": "^19.0.0",
|
||||
"react": "^19.1.0",
|
||||
"react-dom": "^19.1.0",
|
||||
"react-draggable": "^4.4.6",
|
||||
"react-pro-sidebar": "^1.1.0",
|
||||
"react-router-dom": "^7.3.0",
|
||||
|
|
@ -45,13 +45,15 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.21.0",
|
||||
"@swc/core": "npm:@swc/wasm@1.13.20",
|
||||
"@swc/wasm": "^1.13.20",
|
||||
"@testing-library/dom": "^10.4.1",
|
||||
"@testing-library/jest-dom": "^6.8.0",
|
||||
"@testing-library/react": "^16.3.0",
|
||||
"@testing-library/user-event": "^14.6.1",
|
||||
"@types/react": "^19.0.10",
|
||||
"@types/react-dom": "^19.0.4",
|
||||
"@vitejs/plugin-react-swc": "^3.8.0",
|
||||
"@types/react": "^19.1.0",
|
||||
"@types/react-dom": "^19.1.0",
|
||||
"@vitejs/plugin-react-swc": "^4.1.0",
|
||||
"eslint": "^9.21.0",
|
||||
"eslint-plugin-react-hooks": "^5.1.0",
|
||||
"eslint-plugin-react-refresh": "^0.4.19",
|
||||
|
|
@ -60,5 +62,10 @@
|
|||
"prettier": "^3.5.3",
|
||||
"vite": "^6.2.0",
|
||||
"vitest": "^3.2.4"
|
||||
},
|
||||
"resolutions": {
|
||||
"vite": "7.1.7",
|
||||
"react": "19.1.0",
|
||||
"react-dom": "19.1.0"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue