React.js Docker - Module not found

后端 未结 2 638
情深已故
情深已故 2021-01-20 07:00

Prerequisites

Linux 18.04

create-react-app 2.0

docker 19.09.0

Dockerfile

# ba         


        
2条回答
  •  佛祖请我去吃肉
    2021-01-20 07:11

    Everything has been working just fine, but after installing a new package docker stopped working as expected. Every time I run docker-compose up it fails with 'Module not found' error.

    You need to rebuild your image to have that package installed. docker-compose build, and then docker-compose up

    EDIT

    Based on your update, I realize that the problem is your old node_module volume persisted between builds. Try docker-compose down -v before up.

提交回复
热议问题