coffee
coffee copied to clipboard
Coffee not brewing ☕️
First of all—very cool project!
I am trying to set it up and run it within a nextjs app.
I ran my nextjs app, then opened a new terminal, cd into the nextjs directory, and ran the docker container with my OpenAI API key.
However, when I add a <Coffee> component and save my file, nothing changes. There appear to be no changes in my output, either.
I followed the instructions exactly — what might be the cause?
Nice, do you run Coffee docker from same folder as your FE code?
docker run --pull=always -it -e OPENAI_API_KEY=${OPENAI_API_KEY} -v $(pwd):/mount coframe/coffee:latest
In this command -v $(pwd):/mount
is mirroring all files from current folder $(pwd)
to /mount
folder in docker.
I'll add check that /mount
is not empty on startup.
Scratch that, something else is an issue. What is filename of file you edit and OS you are using?
Yes, same directory. I'm on MacOS Monterey, M1 Chip. Filename is src/app/components/destinations.tsx
Have same issue on windows - it doesn't recognize the coffee component.
on windows(inside the app dir): docker run --pull=always -it -e OPENAI_API_KEY="xxxx" -v "${PWD}:/mount" coframe/coffee:latest
@petersolimine great thanks for opensourcing!!
Same issue here on Windows. The coffee component isn't recognized despite running docker in the same directory.
ssue could be related to permissions or the location of the Compose binary.Here are a few steps you can take to troubleshoot this issue:
- which docker-compose; this should return the path to the Docker Compose binary. Make sure that this path is included in your system's PATH environment variable.
- ls -l $(which docker-compose)
- sudo chmod +x $(which docker-compose)
- docker-compose --version
- sudo chmod +x $(which docker-compose)
- docker-compose --version Check for any conflicting Docker installations: Make sure that there are no other Docker installations on your system that could be conflicting with Docker Desktop. If there are, you may need to uninstall them before reinstalling Docker Desktop.
I am having the same issue using Windows. I have run into similar issues before with file watching inside a container and it seems that that is a known issue. See https://stackoverflow.com/a/70686685
I tried using docker-volume-watcher
but didn't help as the bind was skipped since it has invalid source path.
I tried using the PollingObserver
but that didn't work for me either, probably my lack of Python skills.
One thing I did notice, With the PollingObserver
it would list the files/folders in the root of my Next.js target project
While with the
Observer
it didn't
When I run py .\main.py
on my Windows machine it works just fine with a small issue of always duplicating the import Coffee from './components/Coffee';
line.