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

http-server will not load web page #39

Closed
josephtmartin opened this issue Aug 13, 2020 · 9 comments
Closed

http-server will not load web page #39

josephtmartin opened this issue Aug 13, 2020 · 9 comments

Comments

@josephtmartin
Copy link

Your Name:

Joseph Martin

Describe your issue:

When I hs -o my page will not load and i get an error saying "Aw, Snap!" something went wrong when displaying this webpage

List any error messages that appear:

"Aw, Snap!" something went wrong when displaying this webpage (error message is displayed on the chrome window)

What have you googled?

  • How to fix: "Aw, Snap!" something went wrong when displaying this webpage
  • http-server saying "Aw, Snap!" something went wrong when displaying this webpage

What have you tried?

  • Clearing chrome cache
  • Hard refresh(shift+ctrl+r)
  • tried loading it in a different browser(edge) and still didn't display
  • closing terminal/vscode and restarting
  • restarted laptop

Code Snippet (If applicable)

N/A
Screenshot (31)
Screenshot (32)

@josephtmartin josephtmartin added the help wanted Student request for help label Aug 13, 2020
@drteresavasquez
Copy link
Contributor

drteresavasquez commented Aug 13, 2020

@josephtmartin try explicitly going to http://127.0.0.1:8080/index.html or any other page and see if the server loads. Let me know what you find. Also check your network tab in dev tools to see if it gives you any more info about the error.

I found this issue on GH and it may be helpful. http-party/http-server#525

@drteresavasquez drteresavasquez added the Currently Getting Help 🔨 Student is currently getting help label Aug 13, 2020
@drteresavasquez drteresavasquez changed the title Local server will not load http-server will not load web page Aug 13, 2020
@josephtmartin
Copy link
Author

@drteresavasquez i tried http://127.0.0.1:8080/index.html and other pages it did not work. My network tab in dev tools did not throw any errors either. I looked at that issue and should I try to uninstall and install an older version of http-server?

@drteresavasquez
Copy link
Contributor

You can try to uninstall and reinstall globally. Was it working before?

@josephtmartin
Copy link
Author

It has been working fine until last night i went to refresh my page and it never loaded then gave me the "Aw,Snap!" error.

When i try to uninstall it gives me this:
goldglove@Bork:/mnt/c/Users/goldg$ npm uninstall -g http-server
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/http-server/node_modules/basic-auth
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/http-server/node_modules/colors
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/http-server/node_modules/corser
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/http-server/node_modules/eventemitter3
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/http-server/node_modules/follow-redirects
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/http-server/node_modules/he
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/http-server/node_modules/lodash
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/http-server/node_modules/async
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/http-server/node_modules/mime
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/http-server/node_modules/minimist
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/http-server/node_modules/mkdirp
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/http-server/node_modules/ms
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/http-server/node_modules/debug
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/http-server/node_modules/opener
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/http-server/node_modules/portfinder
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/http-server/node_modules/qs
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/http-server/node_modules/requires-port
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/http-server/node_modules/http-proxy
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/http-server/node_modules/secure-compare
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/http-server/node_modules/union
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/http-server/node_modules/url-join
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/http-server/node_modules/ecstatic
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/http-server
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/http-server/node_modules
npm WARN checkPermissions Missing write access to /usr/lib/node_modules
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/lib/node_modules/http-server/node_modules/basic-auth
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/lib/node_modules/http-server/node_modules/basic-auth'
npm ERR! [Error: EACCES: permission denied, access '/usr/lib/node_modules/http-server/node_modules/basic-auth'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/lib/node_modules/http-server/node_modules/basic-auth'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/goldglove/.npm/_logs/2020-08-13T17_40_33_598Z-debug.log

@josephtmartin
Copy link
Author

Ok so i figured out how to uninstall and re-install and i tested on my sorting-hat and it worked perfectly but it still isn't working on my pants project

@drteresavasquez
Copy link
Contributor

@josephtmartin ensure you are in the right directory when you run it. I am not sure what is happening so we may need to jump on Zoom later tonight. In the meantime, you can navigate to the files and run them with the browser. Send me some times after 5 that work for you.

@josephtmartin
Copy link
Author

Well i think the issue is with my local directory. I made a new directory and cloned our team repo to it and it is working now.

@drteresavasquez
Copy link
Contributor

@josephtmartin that is great to hear. I am not sure why that happened, but glad you found a solution!

@josephtmartin
Copy link
Author

When reading that GH link you sent me i read that people where having issues with their directories so i just made a new one and am now good to go!

@josephtmartin josephtmartin reopened this Aug 13, 2020
@josephtmartin josephtmartin added Issue Resolved and removed Currently Getting Help 🔨 Student is currently getting help help wanted Student request for help labels Aug 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants