Koa@Next example not working
See original GitHub issuehaving the imports, a valid htpasswd and its path testet, basic set like in the example, using koa next …
app.use(koaAuth(basic));
results in
TypeError: koaAuth is not a function
at file:///mnt/.........../server.mjs:114:13
at Generator.next (<anonymous>)
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
[@types/koa-router] incompatible type with koa #36161 - GitHub
I tried using the @types/koa-router package and had problems. I tried using the latest stable version of tsc.
Read more >Koa - next generation web framework for node.js
Introduction. Koa is a new web framework designed by the team behind Express, which aims to be a smaller, more expressive, and more...
Read more >koa js: What does "next" refer to, and can cascading be ...
I'm assuming not, and the behavior is just dependent on the argument order in the function. If this is the case, then how...
Read more >next generation web framework for node.js
Koa is a new web framework designed by the team behind. Express, which aims to be a smaller, more expressive, and more robust...
Read more >koa-next - npm Package Health Analysis - Snyk
In the past month we didn't find any pull request activity or change in issues status has been detected for the GitHub repository....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It fails because Koa requires
next()
to beawait next()
. This can result in really weird errors. In @BananaAcid 's case I belive it will always continue running the next middleware, which is probably not what is intended.One way I could make it work is this:
Koa integration removed, please check https://github.com/http-auth/http-auth-koa