I am trying to install react-html-parser
in my docker container \'client\':
docker-compose.yml
client/
Dockerfile-dev
node_modules/
When your docker-compose.yml
file says:
volumes:
- '/usr/src/app/node_modules'
You're telling Docker your node_modules
directory contains critical data that needs to be persisted across container runs. The first time you launch the container it will get populated from the image, but because that directory contains critical data, Docker will never ever update it again, even if you try to npm install
additional modules.
For a near-term workaround, it's enough to docker-compose stop; docker-compose rm; docker-compose up --build
your containers. Deleting the existing container (and its anonymous volume) is important.