Function with serverless app crashes after second request running in netlify dev
#6840
Labels
type: bug
code to address defects in shipped code
netlify dev
#6840
Describe the bug
I have a function named "index" that uses serverless to return a Koa app. The function builds successfully and starts using dev. If I make requests against the root endpoint using a tool like postman, the cli will crash after the second request completes. It crashes in the browser too but it's easier to see the behavior in a tool that makes a single request.
Steps to reproduce
git clone https://codeberg.org/rlmcneary2/funcstache-website.git
npm i
npm run build && npm run dev
Following the second request others will fail because the cli process has exited.
Requests against the "images" function in the environment (a standard synchronous function) never fail.
Configuration
[build]
environment = { NODE_VERSION = "20.16.0" }
[dev]
autoLaunch = false
[context.dev]
publish = "."
[functions."images"]
included_files = ["./images/**"]
[functions."index"]
included_files = ["./site/**"]
[[redirects]]
force = true
from = "/favicon.ico"
status = 200
to = "/images/favicon.ico"
[[redirects]]
force = true
from = "/images/*"
status = 200
to = "/.netlify/functions/images/:splat"
[[redirects]]
force = true
from = "/*"
status = 200
to = "/.netlify/functions/index/:splat"
Environment
Ubuntu running in WSL2.
System:
OS: Linux 5.15 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)
CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
Memory: 4.96 GB / 7.61 GB
Container: Yes
Shell: 5.8.1 - /usr/bin/zsh
Binaries:
Node: 20.16.0 - ~/.nvm/versions/node/v20.16.0/bin/node
Yarn: 1.22.19 - /usr/bin/yarn
npm: 10.8.1 - ~/.nvm/versions/node/v20.16.0/bin/npm
npmPackages:
netlify-cli: ^17.36.2 => 17.36.2
The text was updated successfully, but these errors were encountered: