Skip to content
This repository has been archived by the owner on Jan 7, 2023. It is now read-only.

Docker-101: Tutorial - Node Application does not open on port 3000. #20

Open
rajBopche opened this issue May 14, 2020 · 9 comments
Open

Comments

@rajBopche
Copy link

I was following the Docker 101 tutorial on the Docker Playground and reached Starting an App Container checkpoint in Our Application section.

Screenshot 2020-05-14 at 8 24 20 PM

As directed I hit the docker run -dp 3000:3000 docker-101 command and waited for 3000 badge to appear on PWD interface, but nothing happened the badge never appeared.

Instead, a very long ambiguous number appeared after the command on PWD in Docker Playground.

Screenshot 2020-05-14 at 8 14 22 PM

I even tried manually to access localhost, but all in vain.

Screenshot 2020-05-14 at 8 15 53 PM

MacBook Pro Specs:

  1. MacBook Pro (13-inch, 2017, Two Thunderbolt 3 ports)
  2. Processor 2.3Ghz Dual-Core Intel Core i5
  3. Memory 8 GB 2133 Mhz LPDDR3

OS:

  1. macOS Catalina
  2. version: 10.15.3

Google Chrome:

  1. version: 81.0.4044.138 (Official Build) (64-bit)

I was never able to access the Node To-Do List Application running on port 3000.

@eoiwes
Copy link

eoiwes commented Jun 19, 2020

Same for me

@KaushikPathak90
Copy link

KaushikPathak90 commented Jul 26, 2020

I was following the Docker 101 tutorial on the Docker Playground and reached Starting an App Container checkpoint in Our Application section.

Screenshot 2020-05-14 at 8 24 20 PM

As directed I hit the docker run -dp 3000:3000 docker-101 command and waited for 3000 badge to appear on PWD interface, but nothing happened the badge never appeared.

Instead, a very long ambiguous number appeared after the command on PWD in Docker Playground.

Screenshot 2020-05-14 at 8 14 22 PM

I even tried manually to access localhost, but all in vain.

Screenshot 2020-05-14 at 8 15 53 PM

MacBook Pro Specs:

  1. MacBook Pro (13-inch, 2017, Two Thunderbolt 3 ports)
  2. Processor 2.3Ghz Dual-Core Intel Core i5
  3. Memory 8 GB 2133 Mhz LPDDR3

OS:

  1. macOS Catalina
  2. version: 10.15.3

Google Chrome:

  1. version: 81.0.4044.138 (Official Build) (64-bit)

I was never able to access the Node To-Do List Application running on port 3000.

@rajBopche if you have used "Play with Docker" to follow the tutorial. It is not necessary to mention your hardware details.

"waited for 3000 badge to appear on PWD interface" -> Appeared. Clicked new tab opened but no list output(app).
Tried using diff browser Chrome and Firefox to check if Extensions were an issue but same result.

@KaushikPathak90
Copy link

Checked now..
Blank page opening with Title: Todo App

@42lan
Copy link

42lan commented Oct 30, 2020

The problem persists. Running container in "attached" mode shows this output:

$ docker run -p 3000:3000 docker-101
internal/modules/cjs/loader.js:638
    throw err;
    ^

Error: Cannot find module '/app/src/index.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)

@nikkhielseath
Copy link

Checked now..
Blank page opening with Title: Todo App

Greetings,
I know, my reply is too late but, if you still try to do what you did earlier and still see a blank page with the Todo App title.
Can I please see the output in your browser console (like, open it up by Right Clicking and Inspect)?

Regards
SNikhill

@42lan
Copy link

42lan commented Feb 1, 2021

Hi @SNikhill!

There is no more error.

Best regards.
docker101

@nikkhielseath
Copy link

Greetings,
Thank you for replying. Good to know that no errors exist. :)

Regards
SNikhill

@ofaurax
Copy link

ofaurax commented Apr 7, 2021

The problem persists. Running container in "attached" mode shows this output:

$ docker run -p 3000:3000 docker-101
internal/modules/cjs/loader.js:638
    throw err;
    ^

Error: Cannot find module '/app/src/index.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)

Same problem here and now

@alexkolo
Copy link

alexkolo commented Oct 18, 2021

Solution. To do it correctly you need to first go in the folder "/app" and create there the dockerfile, build and run it. Then it works. if you do it from root it will fail.

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

No branches or pull requests

7 participants