Estoy usando Django para back-end y no estoy haciendo front-end
Cuando trato de construir la ventana acoplable, sale este error
<--- Last few GCs ---> [24:0x557c8d525880] 51739 ms: Mark-sweep (reduce) 480.2 (495.1) -> 480.1 (493.6) MB, 1552.3 / 0.0 ms (average mu = 0.108, current mu = 0.002) last resort GC in old space requested [24:0x557c8d525880] 53295 ms: Mark-sweep (reduce) 480.1 (493.6) -> 480.1 (493.6) MB, 1556.0 / 0.0 ms (average mu = 0.056, current mu = 0.000) last resort GC in old space requested <--- JS stacktrace ---> FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory The command '/bin/sh -c npm run build' returned a non-zero code: 1 ERROR: Service 'nginx' failed to build : Build failedEncontré una solución en internet.
node --max-old-space-size=1024 index.js
Pero este código devuelve este error.
throw err; ^ Error: Cannot find module '/root/mer/index.js' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15) at Function.Module._load (internal/modules/cjs/loader.js:562:25) at Function.Module.runMain (internal/modules/cjs/loader.js:831:12) at startup (internal/bootstrap/node.js:283:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)Este es mi Dockerfile para nginx
FROM node:16-alpine3.11 as web-build COPY webapp /webapp WORKDIR /webapp RUN npm i RUN npm run build FROM nginx:1.19.0-alpine RUN rm /etc/nginx/conf.d/default.conf COPY nginx.conf /etc/nginx/conf.d COPY --from=web-build /webapp/build /usr/var/nginx/webappEste Dockerfile para todo el proyecto
FROM python:3.8.10 ENV PYTHONUNBUFFERED 1 WORKDIR /meded RUN pip install --upgrade pip COPY requirements.txt /meded RUN pip install -r /meded/requirements.txt ADD . /meded/¿Qué debe hacer el front-end para corregir este error?