Questions tagged [netlify-function]

Netlify functions is one of the services offered in the Netlify platform.

It uses AWS's serverless Lambda functions, but allows users to access them without an AWS account, and with management of the functions all done by Netlify. Netlify functions can be built with either JavaScript or Go.

Learn more about Netlify Functions and their abilities here.

115 questions
0
votes
0 answers

Packet error with express JS [Serverless lambda/Netlify Functions]

I'm migrating my express JS app to Netlify functions. When both running the project locally and in production, I receive this error in the console upon request, and the process is terminated. Has anyone run into this issue before and would know how…
Ethan Crabb
  • 302
  • 5
  • 14
0
votes
0 answers

Express 4.x only returning empty object from axios post request

I'm trying to create a contact form in my react app. Every time I submit the form my Express server only receives the parameters that are empty. Here is my server side code: app.use(express.json()); router.post("/contact", (req, res) => { …
Tehreem
  • 939
  • 2
  • 14
  • 31
0
votes
1 answer

cloudconvert API NOT working with netlify Serverless function

I was using cloudconvert api from node JS, which was working fine when I hosted in heroku. But when I made netlify serverless function it is returning error. Is it because serverless function exits before completing the task? try { let job =…
Raghu Vallikkat
  • 365
  • 5
  • 16
0
votes
1 answer

Netlify functions unexpected token error while using JSON.parse on post data

I am checking out Netlify functions and currently trying to implement POST requests. This is the code for netlify function: export async function handler(event, context) { const bodyParsed = JSON.parse(event.body); return { …
Prabodh
  • 165
  • 2
  • 12
0
votes
1 answer

Webhook Error: Unable to extract timestamp and signatures from header - Netlify Functions and Stripe

I am trying to console log the Stripe customerID once the checkout.session.completed event is complete. but I am getting this 400 status code error "Unable to extract timestamp and signatures from header". I can't seem to figure out a solution to…
0
votes
4 answers

React Js App is not working at localhost:3000 but it' works fine on localhost:8888(Netlify Dev)

I am Building a tiktok-clone using react js ..with the help of netlify cli (Netlify Dev)..it works very fine in localhost:8888, but it doesn't work in localhost:3000.My database for this project is datastax astra. Need Help!! This is the pic...on…
user14772790
0
votes
1 answer

Is it possible to specify which port my Netlify function is published on?

I would like my published production Netlify function to be accessed on a specific port e.g. https://Netlify-function-url:34567 Is there some way to specify the 34567 in this example?
BruceM
  • 1,549
  • 1
  • 18
  • 41
0
votes
1 answer

Gatsby Serverless Function Error: 404 Not Found

I've been trying to set up a serverless function for sending emails in my Gatsby website. The function is being hosted, but whenever I try to get it, it tells me that it doesn't exist. My fetch: const body = { name, email, phone, …
0
votes
2 answers

`__typename` returned by the server isn't match to graphql schema

When I build schema using type-graphql and make a server with apollo-server-lambda and deploy it to netlify functions, something wrong happened. schema generated by type-graphql # ----------------------------------------------- # !!! THIS FILE WAS…
0
votes
1 answer

Authorisation error with sparkpost when sending mails with their api

I'm trying to send emails from netlify functions with the api from sparkpost. But when I'm testing the function with functions:invoke verify-email --no-identity I get only a 401 error I have this simple function const SparkPost =…
Gregor Voinov
  • 2,203
  • 7
  • 34
  • 52
0
votes
1 answer

Error with Lambda Function running on NodeJS netlify-lambda — "TypeError: Expected signal to be an instanceof AbortSignal"

I’ve recently been trying to set up a Lambda Function on a Netlify site. The rest of the site is running on Gatsby. I’m able to get some basic functions working in development and production (e.g. returning a “hello world”), but I’m running into a…
Fin Moorhouse
  • 335
  • 5
  • 15
0
votes
1 answer

Fetch().then() does not return data

I am having some trouble in getting fetch return data from my cloud function, I am only trying to write data into google spreadsheet with cloud function for now. Below is my current code so far. I have a button with onClick={this.AddRecord} which…
0
votes
1 answer

set NODE_PATH in netlify dev - absolute imports

Hi how can I set NODE_PATH like in .env file for a netlify dev. Because I got an errors Module not found: Can't resolve 'index.css' in '/mnt/y/projects/instagram-story-saver/src' App is built on Create React App
nightspite
  • 101
  • 1
  • 8
0
votes
1 answer

stripe.confirmCardPayment intent secret Returns Empty String

I'm trying to implement Stripe Elements Payment Intents into my React app using Netlify Functions. Submitting the payment form returns the error: Unhandled Rejection (IntegrationError): Invalid value for stripe.confirmCardPayment intent secret:…
0
votes
1 answer

Netlify Lambda doesn't include supporting files for Function

I'm using Netlify Lambda to host a form on my website. The form worked great but it was really messy. To clean up the file I created a new file with the necessary functions and imported them into my form file. Now I have two files instead of one.…
Kayla
  • 165
  • 2
  • 4
  • 13