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 -
- set timeout=6000000 in my .npmrc file
- edited /etc/firewalld/firewalld.conf
- changed /etc/docker/daemon.json
my internet is fine
everytime i get the same error with a different package
what should i do ?