Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coffee not brewing ☕️ #53

Open
petersolimine opened this issue Dec 15, 2023 · 7 comments
Open

Coffee not brewing ☕️ #53

petersolimine opened this issue Dec 15, 2023 · 7 comments

Comments

@petersolimine
Copy link

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 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
@1um
Copy link
Contributor

1um commented Dec 15, 2023

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
Copy link
Contributor

1um commented Dec 15, 2023

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

@petersolimine
Copy link
Author

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

@saikrishnaklu1993
Copy link

saikrishnaklu1993 commented Dec 16, 2023

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

@sam-shridhar1950f
Copy link

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

@OmmAshutosh
Copy link

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.

@mauricedb
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants