sh: react-scripts: not found

sh: react-scripts: not found

docker create-react-app Пример docker-compose для React

Возможный вариант:

docker-compose.yml:

version: '3.9'
services:
  frontend:
    working_dir: /var/www
    volumes:
      - '.:/var/www'
    ports:
      - "3000:3000"

Dockerfile:

FROM node:18.15-alpine
WORKDIR /var/www
COPY package.json ./
COPY package-lock.json ./
RUN npm ci
COPY ../ .
CMD npm start

Проблемы и решения для node_modules/

Всего есть две задачи/проблемы:

Subscribe to RSS - sh: react-scripts: not found