# Docker-compose vidly can't fetch movies

**URL:** <https://forum.codewithmosh.com/t/docker-compose-vidly-cant-fetch-movies/3843>\
**Category:** Uncategorized\
**Created:** [April 3, 2021, 10:40pm UTC](https://forum.codewithmosh.com/t/docker-compose-vidly-cant-fetch-movies/3843 "2021-04-03T22:40:32Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ronl](https://avatars.discourse-cdn.com/v4/letter/r/97f17d/32.png) [@ronl](https://forum.codewithmosh.com/u/ronl)\
**Post date:** [April 3, 2021, 10:40pm UTC](https://forum.codewithmosh.com/t/docker-compose-vidly-cant-fetch-movies/3843/1 "2021-04-03T22:40:32Z")

</div>

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.

Thanks,

Ron

---

<div class="post-metadata">

**Author:** ![ronl](https://avatars.discourse-cdn.com/v4/letter/r/97f17d/32.png) [@ronl](https://forum.codewithmosh.com/u/ronl)\
**Post date:** [April 4, 2021, 10:34pm UTC](https://forum.codewithmosh.com/t/docker-compose-vidly-cant-fetch-movies/3843/2 "2021-04-04T22:34:24Z")

</div>

I had to fix the docker-entrypoint.sh command.  
Working now  
Uggg

---

<div class="post-metadata">

**Author:** ![sstrool](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/sstrool/32/1293_2.png) [@sstrool](https://forum.codewithmosh.com/u/sstrool)\
**Post date:** [April 5, 2021, 4:40pm UTC](https://forum.codewithmosh.com/t/docker-compose-vidly-cant-fetch-movies/3843/3 "2021-04-05T16:40:04Z")

</div>

thanks, but how did you fix it?

---

<div class="post-metadata">

**Author:** ![ronl](https://avatars.discourse-cdn.com/v4/letter/r/97f17d/32.png) [@ronl](https://forum.codewithmosh.com/u/ronl)\
**Post date:** [April 5, 2021, 5:12pm UTC](https://forum.codewithmosh.com/t/docker-compose-vidly-cant-fetch-movies/3843/4 "2021-04-05T17:12:13Z")

</div>

command: [“sh”, “docker-entrypoint.sh”]

fixed it my using the array format

---

<div class="post-metadata">

**Author:** ![CodeWithSouma](https://avatars.discourse-cdn.com/v4/letter/c/48db29/32.png) [@CodeWithSouma](https://forum.codewithmosh.com/u/CodeWithSouma)\
**Post date:** [May 14, 2021, 6:27am UTC](https://forum.codewithmosh.com/t/docker-compose-vidly-cant-fetch-movies/3843/5 "2021-05-14T06:27:16Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![faintsignal](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/faintsignal/32/52_2.png) [@faintsignal](https://forum.codewithmosh.com/u/faintsignal)\
**Post date:** [December 2, 2021, 10:00pm UTC](https://forum.codewithmosh.com/t/docker-compose-vidly-cant-fetch-movies/3843/6 "2021-12-02T22:00:37Z")

</div>

> [@ronl](#):
>
> command: [“sh”, “docker-entrypoint.sh”]

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

---

<div class="post-metadata">

**Author:** ![faintsignal](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/faintsignal/32/52_2.png) [@faintsignal](https://forum.codewithmosh.com/u/faintsignal)\
**Post date:** [December 7, 2021, 2:44am UTC](https://forum.codewithmosh.com/t/docker-compose-vidly-cant-fetch-movies/3843/7 "2021-12-07T02:44:10Z")

</div>

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

> [@Docker-compose migrations are not working](https://forum.codewithmosh.com/t/docker-compose-migrations-are-not-working/7091):
>
> Hello! I followed the tutorial and in the Migrating the Database section, I receive a “Could not fetch the movies!” message. I tried changing command: ./docker-entrypoint.sh to command: [“sh”, “docker-entrypoint.sh”] but the result is the same. I’m following the tutorial on Windows but I don’t think it matters because the image is Linux Alpine … Did anyone encountered the same problem?

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

---

<div class="post-metadata">

**Author:** ![iammrbt](https://avatars.discourse-cdn.com/v4/letter/i/f19dbf/32.png) [@iammrbt](https://forum.codewithmosh.com/u/iammrbt)\
**Post date:** [December 21, 2023, 1:39pm UTC](https://forum.codewithmosh.com/t/docker-compose-vidly-cant-fetch-movies/3843/8 "2023-12-21T13:39:58Z")

</div>

Thank you!!! @Mosh should really update this yml file for everyone 😉 Changing to an array worked!
