net::ERR_CONTENT_LENGTH_MISMATCH on angular 2 on docker cloud

橙三吉。 提交于 2019-12-01 11:29:14

问题


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:


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.



来源:https://stackoverflow.com/questions/44351273/neterr-content-length-mismatch-on-angular-2-on-docker-cloud

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!