1

my Dockerfile.dev

FROM node:alpine

WORKDIR /usr/app

COPY package.json .
RUN npm install

COPY . .

CMD [ "npm", "run", "start" ]

my docker-compose.yml

version: "3"
services:
  react-app:
    build:
      context: .
      dockerfile: Dockerfile.dev
    ports:
      - 3007:3000
    volumes:
      - /usr/app/node_modules
      - .:/usr/app

everytime i run docker-compose up, i get the following error

npm ERR! network Invalid response body while trying to fetch https://registry.npmjs.org/tsutils: aborted
npm ERR! network This is a problem related to network connectivity.

OR

npm ERR! network Invalid response body while trying to fetch https://registry.npmjs.org/cross-spawn: aborted
npm ERR! network This is a problem related to network connectivity.

tried the following -

  1. set timeout=6000000 in my .npmrc file
  2. edited /etc/firewalld/firewalld.conf
  3. changed /etc/docker/daemon.json

my internet is fine

everytime i get the same error with a different package

what should i do ?

keemahs
  • 780
  • 11
  • 14

0 Answers0