Closed milensski closed 7 months ago
I receive an error at build time:
Error response from daemon: ./frontend/node_modules is not an absolute path
I have deleted the node_modules folder at the frontend and also cleaned my docker cache. Is it just me? @milensski @dinocom33
I successfully build the images and ran the containers. There were no errors.
I successfully build the images and ran the containers. There were no errors.
Do you see the node modules locally in frontend/node_modules
?
I successfully build the images and ran the containers. There were no errors.
Do you see the node modules locally in
frontend/node_modules
?
Yes. The modules are there.
So I was able to resolve the error, I guess I had cached stuff or something else. However, I still don't see the node_modules
locally in my /frontend/node_modules
.
@milensski if you delete the node_modules
folder, and then you docker compose up
, are the node modules appearing locally?
So I was able to resolve the error, I guess I had cached stuff or something else. However, I still don't see the
node_modules
locally in my/frontend/node_modules
.@milensski if you delete the
node_modules
folder, and then youdocker compose up
, are the node modules appearing locally?
@julkascript Yes, i delete the node_modules folder, the container and the volume and after docker compose up -d
everything is created again. I have tried 2 times today and it worked.
The error on the picture you shared indicates problems with absolute path, is it something with the OS setup ?
The relative path is used to map the locally created volume with the container to the specified path so they can be placed in the right folder frontend/
Line 82: device: ./frontend/node_modules
This PR is targeting issue #73 .
To achieve this task I have used a simple solution by setting the storage location of the volume to correspond with the
node_modules
directory of the host. To do this, a named volume with a local driver and a bind mount has been utilized.Synchronizing the
node_modules
folder from the container to the host is established at creating the container with docker compose. Please note that this action is time consuming and it used around 500sec to be created.Please test it and let me know if you approve this approach.