Closed sidtohan closed 1 week ago
Hey @sidtohan! 👋🏽
We'd be happy to help you with this.
Could you share the output of docker version
with us?
Generally this issue was solved by simply asking people to update to the latest version of docker in the past. But you're mentioning you're already on the latest version.
However, you also mentioned that you're on Pop!_OS 22.04 LTS
which might simply not have a build for the version of docker that contains the watch
command yet, making the latest version be not the actually latest release of docker.
For reference: The latest docker version listed online appears to be 24.0.9
Here is the output for docker version command.
Thanks @sidtohan for submitting the issue. The problem seems to be related to the version of docker installed. It is actually better if we move to using docker compose
instead of docker-compose
as the docker-compose
project has probably stopped receiving updates.
We could make the changes so that even older versions of docker and docker-compose
is supported.
The differences between docker-compose
and docker compose
can be found here
I also think this is a good point to make some prerequisite checks before starting the container for development. This way we could provide better troubleshooting experience for the user. the prerequisite checks could include:
We should make a separate issue for that. @jayantbh what are your thoughts?
Yea, a checklist that is part of the dev.sh script might work well to prevent similar issues.
Also, previously I had mentioned that the latest version is 24.0.7. My bad, the latest is actually 26.1.3, and @sidtohan's version appears to be pretty close to that.
Perhaps as a fix to this at the moment, we should change the command from docker-compose
to docker compose
instead.
Think that'll work? @adnanhashmi09 @sidtohan
Yea, a checklist that is part of the dev.sh script might work well to prevent similar issues.
Also, previously I had mentioned that the latest version is 24.0.7. My bad, the latest is actually 26.1.3, and @sidtohan's version appears to be pretty close to that.
Perhaps as a fix to this at the moment, we should change the command from
docker-compose
todocker compose
instead.Think that'll work? @adnanhashmi09 @sidtohan
Yes that should work as a quick fix.
But a better way would be to first run docker compose watch
and if it fails then try docker-compose watch
. If both fail, we throw an error. For the sake of backwards compatibility.
@sidtohan just following up. Were you able to move past this?
Hey @jayantbh , still facing the same issue. I tried replacing the docker-compose
commands in app.tsx with docker compose
. However, I'm facing this issue now.
@sidtohan What changes did you make? I don't think you are using the spawn command correctly. Please refer to the nodejs docs. For some reference you are supposed to use the runCommand
function like this:
const commandResponse = runCommand(
'docker',
['compose', 'watch'],
runCommandOpts
);
@sidtohan What changes did you make? I don't think you are using the spawn command correctly. Please refer to the nodejs docs. For some reference you are supposed to use the
runCommand
function like this:const commandResponse = runCommand( 'docker', ['compose', 'watch'], runCommandOpts );
Yes, you are right @adnanhashmi09, my bad. I have used it properly now, and the error doesn't occur anymore.
Can this issue be assigned to me please? I would like to implement the proper fix as suggested above(running docker compose
first and then reverting to docker-compose
should it fail)
@sidtohan done!
Closing this, as this was fixed in #431
Description:
Unable to run the dev.sh script. It gives an error in the docker-compose.yml file as well as an issue with the "watch" command.
Steps to reproduce:
./dev.sh
Expected behavior:
dev.sh should start the application with the development environment.
Actual behavior:
Server Setup Information:
Additional context
I came across this discussion on stack overflow. Maybe the current code uses an older version of docker compose?
Also, found this in the cli/source/app.tsx file: