Docker-compose vidly can't fetch movies

Not sure what I’m doing wrong. I ran docker-compose. Seems to run ok. When access localhost:3000 I get can’t fetch movies (can’t enter on either). I tried running the mongo container manually then started the backend and frontend and it appears to work.

Anybody else struggling with this. Don’t know what else to try.



1 Like

I had to fix the command.
Working now

thanks, but how did you fix it?

1 Like

command: [“sh”, “”]

fixed it my using the array format


hey can you give me the zip file of docker-compose section

Thanks. I tried this and it resolved the CORS error that was occurring when the API request for the movies was sent, but now I’m still not receiving a list of movies back from the request (just an empty response). Did anyone else have this problem too?

EDIT: It seems while setting up the backend compose did not accept the “sh” as a legal command

backend_1 | internal/modules/cjs/loader.js:883
backend_1 | throw err;
backend_1 | ^
backend_1 |
backend_1 | Error: Cannot find module ‘/app/“sh”’
backend_1 | at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
backend_1 | at Function.Module._load (internal/modules/cjs/loader.js:725:27)
backend_1 | at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
backend_1 | at internal/main/run_main_module.js:17:47 {
backend_1 | code: ‘MODULE_NOT_FOUND’,
backend_1 | requireStack: []
backend_1 | }

If anyone in the same boat is me, I followed the approach given by Vermin over at this thread:

It’s unfortunate that this course seems to be missing some information for us to correctly run the example code.