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.

Server Middleware not included in lambda

See original GitHub issue

I’m getting this error: λ Error while initializing nuxt: { Error: Cannot find module './api/auth'

I am just not sure how to get my API middleware files included in the lambda. Is that something I need to do in the now config or in nuxt config? File lives at ~/api/auth and is included in next.config like this: serverMiddleware: ['~/api/auth'],.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
itwasmattgreggcommented, Aug 25, 2019

You’re the best! Not sure how I missed that in the docs. Thought I had looked everywhere. Thanks

0reactions
robotpapiercommented, Apr 28, 2020

Thanks for the tips. It helped me understood that I had to point to the folder of my script which was api/** and not server-middleware/** ^^

Read more comments on GitHub >

github_iconTop Results From Across the Web

Server Middleware not included in lambda · Issue #107 - GitHub
I am just not sure how to get my API middleware files included in the lambda. Is that something I need to do...
Read more >
A collection of middleware for AWS lambda functions.
This monorepo is a collection of middleware for AWS lambda functions. Middlewares. @lambda-middleware/class-validator: A validation middleware for AWS http ...
Read more >
Will a Lambda function using Express reload it's middleware ...
This middleware will run upon every request and this has nothing to do with Lambda. Once the requests reaches your Express-based Lambda ......
Read more >
AWS Lambda function errors in Node.js
This page describes how to view Lambda function invocation errors for the Node.js runtime using the Lambda console and the AWS CLI.
Read more >
How to create your own AWS Lambda Middleware framework ...
This post is about a middleware framework we wrote in Node.js to do this with very little code and no external libraries. Middleware...
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