Closed Dosbodoke closed 1 year ago
I had the same problem and also solved it using the --legacy-peer-deps
flag. So you are not alone with this issue.
I don't think that dockerizing the app should or even would be the solution to this though. Rather the focus should be on fixing the dependencies (#219). If we put the whole app in a docker container and change nothing else, the problem would still persist. The only thing that would change is that the npm install --legacy-peer-deps
command could be run by default which, as you have also pointed out, is not a good approach.
I'm not saying that having a docker container is necessarily a bad idea. I don't think that it should be the solution to this particular problem though.
But my experience with web development is limited, so feel free to correct me.
Thanks both for your input! I updated the instructions in the README to include @JulianDietzel suggestion (9df1948).
And I would also agree that I don't see the docker container as completely necessary.
But here is a command to run the development server through docker:
docker run -it --name highline-freestyle --mount type=bind,source="$(pwd)",target=/app -w /app --publish 8080:8080 node:18 sh -c "npm install --legacy-peer-deps && npm run dev"
Although I did not manage to get the port binding to work on my computer, this in theory should work....
Why
When trying to set up the development environment I got the following error on running
npm install
After I ran
npm install --legacy-peer-deps
I was able to open the application locally but this is not a good approach since it can lead to an incorrect (and potentially broken) dependency resolution.What can we do to solve this
Docker Container is a perfect fit for open-source projects and it should be easy to implement on this project. For that, we need to.:
Optionally we can Go further and set up a dev container
See more here