Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

264
Vistas
Netlify-lambda serve redirects from netlify.toml

I have a working netlify-lambda setup. I run netlify-lambda locally and not in the cloud. Upon running

netlify-lambda serve ./functions

the functions I have defined in the /functions folder are served on localhost:9000

I also have my netlify.toml file in my project root, looking like this:

[build]
  functions = "netlify-lambda"
  publish = "build/"
  command = "npm run build"

[[redirects]]
  from = "/test"
  to = "https://google.com"
  status = 200
  force = true

When I remove the [build] part, then the command "netlify-lambda serve" will result in an error. So I conclude that this file is being used. On the other hand the [[redirects]] instruction does nothing at all.

Requests to

localhost:9000/test

or

localhost:9000/.netlify/functions/test

result in an error like

Function invocation failed: Error: Cannot find module '/home/********/netlify-lambda/test'

What am I missing here?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

As described here: https://answers.netlify.com/t/redirects-not-going-to-index-html/20289

Netlify-lambda will only host your functions and nothing else. You’ll need at least the netlify-cli

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda