coffee icon indicating copy to clipboard operation
coffee copied to clipboard

Coffee not brewing ☕️

Open petersolimine opened this issue 1 year ago • 7 comments

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?

Screen Shot 2023-12-15 at 3 21 44 PM Screen Shot 2023-12-15 at 3 21 57 PM

petersolimine avatar Dec 15 '23 20:12 petersolimine

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.

1um avatar Dec 15 '23 22:12 1um

Scratch that, something else is an issue. What is filename of file you edit and OS you are using?

1um avatar Dec 15 '23 23:12 1um

Yes, same directory. I'm on MacOS Monterey, M1 Chip. Filename is src/app/components/destinations.tsx

petersolimine avatar Dec 16 '23 01:12 petersolimine

image image

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!!

saikrishnaklu1993 avatar Dec 16 '23 06:12 saikrishnaklu1993

Same issue here on Windows. The coffee component isn't recognized despite running docker in the same directory.

sam-shridhar1950f avatar Jan 04 '24 01:01 sam-shridhar1950f

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:

  1. 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.
  2. ls -l $(which docker-compose)
  3. sudo chmod +x $(which docker-compose)
  4. docker-compose --version
  5. sudo chmod +x $(which docker-compose)
  6. 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.

OmmAshutosh avatar Jan 10 '24 16:01 OmmAshutosh

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 image While with the Observer it didn't image

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. image

mauricedb avatar May 23 '24 09:05 mauricedb