Support Forums

Netlify deploy stuck on build command

So I’m trying to deploy my nodejs express website, and everything is going well until it reaches the 1st step of deployment. It runs the build command like it normally would on VS code, but then stops and stays in this state for seemingly ever. At this point in VSCODE, the devserver would be up, but I’m not sure what’s going on with this.
5:10:52 PM: Netlify Build
5:10:52 PM: ────────────────────────────────────────────────────────────────
5:10:52 PM: ​
5:10:52 PM: ❯ Version
5:10:52 PM: @netlify/build 17.2.0
5:10:52 PM: ​
5:10:52 PM: ❯ Flags
5:10:52 PM: deployId: 6101c7afb500fe070ea32ae0
5:10:52 PM: ​
5:10:52 PM: ❯ Current directory
5:10:52 PM: /opt/build/repo
5:10:52 PM: ​
5:10:52 PM: ❯ Config file
5:10:52 PM: No config file was defined: using default values.
5:10:52 PM: ​
5:10:52 PM: ❯ Context
5:10:52 PM: production
5:10:52 PM: ​
5:10:52 PM: ────────────────────────────────────────────────────────────────
5:10:52 PM: 1. Build command from Netlify app
5:10:52 PM: ────────────────────────────────────────────────────────────────
5:10:52 PM: ​
5:10:52 PM: $ npm run build:back
5:10:53 PM: > arianfallahpour.com@1.0.0 build:back /opt/build/repo
5:10:53 PM: > node server.js
5:10:54 PM: App running on port 3000
5:10:54 PM: (node:1409) [MONGODB DRIVER] Warning: Current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.

It stops at DATABASE CONNECTED and it’s been 30 mins since.

Welcome to the forums @JinXzAF

There is a great support guide available detailing what you can and can’t do on Netlify and one of those things is running a dev server. Happy try answering any other questions you have.

You have to run the npm run build command locally first if you haven’t. I don’t see the build folder which is produced normally from that command. That build folder is essential and when you deploy it in netlify you also need to mention that build folder in one of the steps before you deploy. I’m on mobile but normally just begore you deploy on netlify you need to set one of the paths to that build folder you will get.