I am trying to deploy an express.js application using the web service on the render.com platform, but encountering an error in the log - 'Exited with status 2 while building your code.'
I'd like to highlight that when I execute npm run build && npm run start from VS Code, i.e., in a local environment, the code successfully transpiles from TypeScript to JavaScript, generates the 'dist' folder, and starts the server without any issues, connecting seamlessly to the MongoDB database.
local environment:
> [email protected] build
> tsc
PS C:\Users\mile_\projects\RESTful-API-Node.js-Express.js-MongoDB-Passport.js> npm run start
> [email protected] start
> node dist/index.js
Connected to MongoDB
Server is running on port 8000.
render.com - https://pastebin.com/SsvHenCQ
github repository - https://github.com/mile-mijatovic/RESTful-API-Node.js-Express.js-MongoDB-Passport.js
Please check if the issue stems from src/types/express.d.ts where I extended express and express-session." Thank you for pointing that out!