sintaxi / harp

Static Web Server/Generator/Bundler
http://harpjs.com
4.99k stars 346 forks source link

server crashing #677

Closed cardeo closed 1 year ago

cardeo commented 1 year ago

so if I run the server, it initially loads my html page, the CSS is not loaded though. If I refresh the browser, server crashes with this output in terminal

/Users/mlambert/.nvm/versions/node/v12.14.0/lib/node_modules/harp/lib/middleware.js:35
    console.log(new Date(), rsp.req.method.green, rsp.statusCode, rsp.req.url, measureBody(contentLength).grey)
                                    ^

TypeError: Cannot read property 'method' of undefined
    at /Users/mlambert/.nvm/versions/node/v12.14.0/lib/node_modules/harp/lib/middleware.js:35:37
    at AsyncResource.runInAsyncScope (async_hooks.js:174:22)
    at listener (/Users/mlambert/.nvm/versions/node/v12.14.0/lib/node_modules/harp/node_modules/on-finished/index.js:170:15)
    at onFinish (/Users/mlambert/.nvm/versions/node/v12.14.0/lib/node_modules/harp/node_modules/on-finished/index.js:101:5)
    at callback (/Users/mlambert/.nvm/versions/node/v12.14.0/lib/node_modules/harp/node_modules/ee-first/index.js:55:10)
    at ServerResponse.onevent (/Users/mlambert/.nvm/versions/node/v12.14.0/lib/node_modules/harp/node_modules/ee-first/index.js:93:5)
    at ServerResponse.emit (events.js:215:7)
    at onFinish (_http_outgoing.js:686:10)
    at afterWrite (_stream_writable.js:501:3)
    at processTicksAndRejections (internal/process/task_queues.js:81:21)

CSS file not loading in console...

GET http://localhost:9000/css/theme.css net::ERR_CONNECTION_REFUSED

MarcosLopezC commented 1 year ago

I'm having the exact same issue with a brand new project. Currently using version v0.46.0.

sintaxi commented 1 year ago

resolved.