net::ERR_CONTENT_LENGTH_MISMATCH on angular 2 on d

2020-03-30 04:37发布

I am getting a net::ERR_CONTENT_LENGTH_MISMATCH main.bundle.js while running angular 2 on docker cloud ,the same however works on my local docker instance

The below is the docker file

FROM node

RUN mkdir -p /usr/src/app

WORKDIR /usr/src/app

COPY . /usr/src/app

RUN npm install

and the docker compose

version: '2'
services:
app:
 build: .
 volumes:
   - ./:/usr/src/app
 ports:
   - 4200:4200
   - 49153:49153
 command: npm start

Any clue as to why this is happening will be of much help

1条回答
三岁会撩人
2楼-- · 2020-03-30 04:43

Happened to me after I updated one of the packages in node_modules. Probably integrity/checksum-related issue. The cure was to flush node_modules and run

$ npm install

again.

查看更多
登录 后发表回答