Site deploy failed Build script returned non-zero exit code: 1

i am trying to deploy my website and i am getting build failed error:

3:06:23 PM: Error running command: Build script returned non-zero exit code: 1
3:06:23 PM: Failing build: Failed to build site
3:06:23 PM: failed during stage ‘building site’: Build script returned non-zero exit code: 1

{
“name”: “adevonx”,
“version”: “1.0.0”,
“description”: "Application Development Operation ",
“main”: “server.js”,
“scripts”: {
“start”: "./node_modules/.bin/netlify-lambda serve ",
“build”: “./node_modules/.bin/netlify-lambda build”
},
“keywords”: [
“Adevon”,
“version”,
“1.0”
],
“author”: “ivo mofor”,
“license”: “ISC”,
“devDependencies”: {
“nodemon”: “^1.19.1”
},
“dependencies”: {
“connect-flash”: “^0.1.1”,
“ejs”: “^2.6.2”,
“express”: “^4.17.1”,
“express-session”: “^1.16.2”,
“mongoose”: “^5.6.9”,
“netlify-lambda”: “^1.6.3”,
“nodemailer”: “^6.3.0”
}
}

please some one help me
thanks

Can you post a link to your repo, if it’s a public repo? If not can you post the contents of the netlify.toml file?

Here is the link
https://github.com/adevon/adevon-test-.git

i hope this helps. I am really new to web dev and this is my first web project i want to host :frowning:

This is a web application, Netlify will be unable to run your app.
If you want to use Netlify, then You’re app needs to generate html,css,javascript files, those files can be copied to Netlify and will be served by Netlify.
Your code needs to run in a server (like Heroku, or AWS, Digital Ocean) when your code is started (with the command line nodemon server.js, just the same way as in your computer) it will “wait” for request, once a request is made it generates and serves those pages. But Netlify expects files, it can host those files. Now there are tools which can generates these files, we call them static site generators (or SSG).
If you definitly want to stick to Netlify, you can check out https://jamstack.org for more information about the concept Netlify follows.

1 Like

@zltnvrs, that’s spot on. :+1:

sure guys… thanks a lot for the advice.

@shevo, this community topic also contains more information about the “no servers” aspect of Netlify:

A post was split to a new topic: Build script returned non-zero exit code: 1 error