Estoy tratando de dockerizar un CRA y luego integrarlo en mi docker-compose junto con otros contenedores. Parece que el contenedor no funciona debido a Craco . Aquí está la salida de error.
docker run -p 7070:3000 je12emy/app > @beextravel/beex-mobile-pwa@0.0.1 start /app > cross-env SKIP_PREFLIGHT_CHECK=true craco start events.js:377 throw er; // Unhandled 'error' event ^ Error: spawn craco ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19) at onErrorNT (internal/child_process.js:467:16) at processTicksAndRejections (internal/process/task_queues.js:82:21) Emitted 'error' event on ChildProcess instance at: at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12) at onErrorNT (internal/child_process.js:467:16) at processTicksAndRejections (internal/process/task_queues.js:82:21) { errno: -2, code: 'ENOENT', syscall: 'spawn craco', path: 'craco', spawnargs: [ 'start' ] } npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @beextravel/beex-mobile-pwa@0.0.1 start: `cross-env SKIP_PREFLIGHT_CHECK=true craco start` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @beextravel/beex-mobile-pwa@0.0.1 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2021-08-20T18_52_28_750Z-debug.log Este es mi dockerfile .
FROM node:14-alpine # set working directory WORKDIR /app # install app dependencies COPY package.json . RUN npm install RUN npm install cross-env -g # add app COPY . ./ # start app CMD ["npm","run","start"]