Home
Support Forums

Node app deployment

I tried to deploy this node.js app but I have this error message.

I tried and push it on my github repo. But still has this error. I don’t understand. Someone can help me please ? What should I put in Build script ?

Here my package.json file :

{

“name”: “chatroom-server”,
“version”: “1.0.0”,
“description”: “”,
“main”: “server.js”,
“scripts”: {
“start”: “node server.js”,
“build”: “netlify-lambda build express”
},
“engines”: {
“node”:“12.19.0”
},
“keywords”: ,
“author”: “”,
“license”: “ISC”,
“dependencies”: {
“body-parser”: “^1.19.0”,
“compression”: “^1.7.4”,
“express”: “^4.17.1”,
“helmet”: “^4.2.0”,
socket.io”: “^2.3.0”
}
}

Hey, Netlify is JAMStack - https://jamstack.org/ meaning that you can’t run a traditional node server here nor a database. You can now use serverless functions to achieve similar but it is not really the design as netlify is intended to serve static sites. If you are looking to serve a traditional nodejs server I think Heroku could be better suited.

Here are some examples although they may be a tad outdated.


Thank you @AaronP! I wasn’t sure about that so thank you for this confirmation!