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

I ran npm install & npm run serve but I am unable to connect to the server on port 8080 as the instructions stated #52

Open
shyamalschandra opened this issue Feb 16, 2017 · 4 comments

Comments

@shyamalschandra
Copy link

What should I do?

Starting up http-server, serving dist/
Available on:
  http://127.0.0.1:8080
  http://192.168.1.30:8080
  http://192.168.1.11:8080
Hit CTRL-C to stop the server
[Thu Feb 16 2017 16:57:55 GMT-0600 (CST)] "GET /" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"
[Thu Feb 16 2017 16:57:55 GMT-0600 (CST)] "GET /" Error (404): "Not found"

This is the output of the log file when I go to the following address on my website:
http://192.168.1.30:8080

@Hinaser
Copy link
Contributor

Hinaser commented Feb 17, 2017

Hi
I suspect you didn't run npm run build before executing npm run serve

Hope this helps.
README should be fixed.

@shyamalschandra
Copy link
Author

shyamalschandra commented Feb 17, 2017

@Hinaser, I followed your instructions and I got the following error:

Shyamals-iMac:src shyamalchandra$ npm run serve

> deep-playground-prototype@2016.3.10 serve /Users/shyamalchandra/playground
> http-server dist/

events.js:161
      throw er; // Unhandled 'error' event
      ^

Error: listen EADDRINUSE 0.0.0.0:8080
    at Object.exports._errnoException (util.js:1023:11)
    at exports._exceptionWithHostPort (util.js:1046:20)
    at Server._listen2 (net.js:1261:14)
    at listen (net.js:1297:10)
    at doListening (net.js:1396:7)
    at _combinedTickCallback (internal/process/next_tick.js:77:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)
    at Module.runMain (module.js:607:11)
    at run (bootstrap_node.js:418:7)
    at startup (bootstrap_node.js:139:9)

npm ERR! Darwin 16.4.0
npm ERR! argv "/usr/local/Cellar/node/7.5.0/bin/node" "/usr/local/bin/npm" "run" "serve"
npm ERR! node v7.5.0
npm ERR! npm  v4.1.2
npm ERR! code ELIFECYCLE
npm ERR! deep-playground-prototype@2016.3.10 serve: `http-server dist/`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the deep-playground-prototype@2016.3.10 serve script 'http-server dist/'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the deep-playground-prototype package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     http-server dist/
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs deep-playground-prototype
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls deep-playground-prototype
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/shyamalchandra/playground/src/npm-debug.log

@Hinaser
Copy link
Contributor

Hinaser commented Feb 17, 2017

Error: listen EADDRINUSE 0.0.0.0:8080
It seems port '8080' was already in use in your environment.

You can choose either one of the following solution:

  1. Kill the instance which uses port 8080 and run npm run serve again.
    In order to find which process uses port 8080, type lsof -i :8080 in your terminal.
    Then kill it by its pid.

  2. Run http server with another port.
    Make sure your current directory is root playground directory before executing the command below.

    node node_modules/http-server/bin/http-server -p <port number you like to use> dist/
    

    For example, in case you want to run server with port 18080:
    node node_modules/http-server/bin/http-server -p 18080 dist/

Best regards.

@AnshChugh
Copy link

I was having same error but I fixed it with by this:
first I ran npm install then I ran npm run serve but it was still giving me error 404
after I typed npm start serve it gave me error at first loading 127.0.0.1:8080 but after reloading 3-4 times it works

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

3 participants