question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Strange behavior in MacOS

See original GitHub issue

I have used this http server for years and never had any issues at all. All the sudden I went to install http-server on my new mac and I am unable to host a simple static HTML file. I am able to install the http-server package using NPM but then when I try to host a web server I see this strange behavior in terminal:

Screen Shot 2022-01-09 at 12 15 49 PM

Environment Versions

  1. MacOS Monterey: 12.1
  2. Node version: 16.13.1
  3. NPM version: 8.1.2
  4. http-server version: 14.0.0

Steps to reproduce

  1. npm i http-server
  2. npx http-server

Expected result

The web server gets hosted and the Terminal window shows network log info as usual

Actual result

The web server is not hosted and instead the terminal window spams endless unrecognizable characters as seen in the screenshot

Other information

I have tried using multiple different versions of the http-server package including versions 13.0.0 and much older versions but the behavior is the same. I tried using sudo when installing the http-server package but that did not change anything. I also tried giving my Terminal Full Disk Access and access to the Developer Tools but nothing I have tried changes the behavior.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
BitesizedLioncommented, Jan 9, 2022

This issue is due to the NPM module “colors”, it’s author went rogue and added an infinite for loop because he thought it would be funny, can be solved by pinning to version 1.4.0

https://github.com/http-party/http-server/blob/72b6b07177cb1ebdd9a74ffd6ec50cd0171a14be/package.json#L89

0reactions
thornjadcommented, Jan 10, 2022

This is fixed in http-server v14.1.0 and backported to v13.1.0. It was indeed caused by Marak/colors.js#285, and we fixed it by switching out colors.js for chalk.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Strange Safari Behavior in macOS 11.3.1 -… - Apple Community
Strange Safari Behavior in macOS 11.3.1 - It Keeps Switching Tabs · 1. Quit Safari, launch Safari holding the Shift key down and...
Read more >
Crazy weird behavior on MacBook pro : r/osx - Reddit
When I pres anything on the keyboard the monitor wakes up again, and the force quit screen (while still open) isn't selected as...
Read more >
Safari on Mac: random odd behavior - AppleVis
I've been seeing very odd behavior with current Safari on Mac. I've been trying to figure out exactly what's happening.
Read more >
SOLVED: Mac Pro 3.1 with strange behavior - iFixit
Mac Pro 3.1 with strange behavior. Hello everyone,. I am having a problem with my Mac Pro 3.0 (A1186) and would like some...
Read more >
Fixing Odd Mac Mouse or Trackpad Behaviors & Random Clicks
Troubleshooting Erratic Mouse & Trackpad Behavior on a Mac by Ditching Input plist Files · From the Mac OS Finder, hit Command+Shift+G to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found