Netlify deploy, process cancelled with exit code 130

Hi All,

I have a monorepo setup, which looks something like this:
image

In the api.js under the server/netlify/functions I am exporting a nodejs rest api as serverless functions, which is working fine locally.

Here is the content of netlify.toml file
image

Here is the content of github actions:
image

Whenever I am trying to deploy the functions as well as the react app at the same time.I am not able to deploy any of them:


Build is failing and showing this error.

My site: https://lovely-brioche-a6b8de.netlify.app/

Kindly help us deploy a monorepo setup fullstack app on netlify.

I’m unsure how this is a Netlify issue. Looks like something is going wrong with your GitHub Action? Unfortunately, we cannot debug that for you.

Can you help us with some articles to deploy both frontend and backend(serverless) functions in monorepo setup as given in the first screenshot of the question.

Since your server has Netlify Functions, I assume you want to use Netlify Functions as your “server”. Are you also planning to host the frontend on Netlify?

Yes, you got it correct

Then I don’t think you need a monorepo or the server directory at all. You can put all your client stuff in the root of the repo and Netlify Functions in the netlify/functions folder, something like:

where src is my client-side Vue application, and Functions are in their folder.

We are exporting a existing express app to serverless function. So we have kept the it light this, and monorepo setup is the requriement so that frontend and backend can be managed easily, as it contains a lot of file.

Then you’d need a complicated setup, something like:

npm i && cd ./client/ && npm i && npm run build && cp ./build/ -r ../server/build/ && cd ../server/ &&npm i &&  npx netlify deploy --build --prod

The above should work if you move your netlify.toml in the server folder with the following data:

[build]
  command = "echo Hi!"
  publish = "./build/"
[functions]
  external_node_modules = ["express"]
  node_bundler = "esbuild"
[[redirects]]
  force = true
  from = "/api/*"
  status = 200
  to = "/.netlify/functions/api/:splat"
[[redirects]]
  from = "/*"
  status = 200
  to = "/index.html"