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.

Breaking change in @tinyhttp/app@1.3.14 w/ sirv middleware

See original GitHub issue

Describe the bug

@tinyhttp/app has introduced an unknown bug in version 1.3.14 which breaks the app.

Bug presents itself when trying to access static files which are server via sirv middleware.

this.app.use('/static', sirv('../static'));

Request fails and error passed to the general error handler consists only of { code: 404 }.

This bug does not appear in any previous version of @tinyhttp/app or in any version of sirv middleware.

To Reproduce

Steps to reproduce the behavior:

  1. install @tinyhttp/app@1.3.14
  2. use sirv middleware to serve static files
  3. start basic server
  4. try to access those files (static HTML file for example)

Expected behavior

A static files will be served without an error

Versions

  • node: 12.x.x
  • @tinyhttp/app: 1.3.14
  • sirv: 1.0.12

Additional context

Please maintain a proper changelog so your users are able to detect what are the changes in new releases and are able to guess which of these might break their application.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
talentlessguycommented, Sep 10, 2021

@pajasevi it works fine on sirv 1.0.17, please upgrade

closing this

in case issue still persists, feel free to reopen

0reactions
aldy505commented, Sep 10, 2021

this is a working codesandbox: https://codesandbox.io/s/bold-torvalds-9k4ui?file=/src/index.js

if you still got a problem, let us know

Read more comments on GitHub >

github_iconTop Results From Across the Web

Breaking change in @tinyhttp/app@1.3.14 w/ sirv middleware
install @tinyhttp/app@1.3.14; use sirv middleware to serve static files; start basic server; try to access those files (static HTML file for ...
Read more >
Breaking changes in .NET 5 - Microsoft Learn
In this article. ASP.NET Core; Code analysis; Core .NET libraries; Cryptography; Entity Framework Core; Globalization; Interop; Networking ...
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