dwyl / autocomplete

:mag: easily find words in the english dictionary
34 stars 5 forks source link

`server.js` broken 😒 #4

Open nelsonic opened 1 month ago

nelsonic commented 1 month ago

Just ran:

npm start

Got:

> word-finder@1.0.3 start
> node server.js

node http server listening on http://localhost:3000
imported a bunch of words! >>  235887
request.url: /
node:events:496
      throw er; // Unhandled 'error' event
      ^

Error [ERR_STREAM_WRITE_AFTER_END]: write after end
    at ServerResponse.end (node:_http_outgoing:1021:15)
    at Server.handler (/autocomplete/server.js:29:14)
    at Server.emit (node:events:518:28)
    at parserOnIncoming (node:_http_server:1143:12)
    at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17)
Emitted 'error' event on ServerResponse instance at:
    at emitErrorNt (node:_http_outgoing:857:9)
    at process.processTicksAndRejections (node:internal/process/task_queues:83:21) {
  code: 'ERR_STREAM_WRITE_AFTER_END'
}

Using: Node.js v20.11.0

Context:

I'm revisiting this project to update it ahead of working on a search feature for day-job work-work ... 🏦 πŸ” Just want to have a stable baseline in JS that I can point people to a basic example ... πŸ”— Only going to spend T25m on trying to get this working again. πŸ§‘β€πŸ’» ⏳ If I can't get it working, will just update the README.md and archive. πŸ“‚

nelsonic commented 1 month ago

Thankfully this was an easy fix: https://stackoverflow.com/questions/60714212/error-err-stream-write-after-end-write-after-end

nelsonic commented 1 month ago

Search (autocomplete) suggestions overlap the quint section:

image

Let's fix this with some Tailwind: https://github.com/dwyl/learn-tailwind