'ran out of memory' issue even node file is very small

Hello, I am a new in the developer world. This is my practicing project. I built an app which can recognized human face. I successfully ran the app on my pc and local host. I also successfully deployed the front end version and database on render. While deploying the node version, after few minutes it said I ran out of memory even though my node file is only about 11 MB. I am using fee version of render. I can guess that there might be a problem in build command and package json file. Some of my course students deployed the same file on render free version without any such issue. In web service, I used ‘npm run build’ in build command and ‘node server.js’ in start command. Server.js is my main starting file. My node version is 18.14.2 and npm version is 9.5.0. My package json file below:

“name”: “smart-brain-api”,
“version”: “1.0.0”,
“description”: “”,
“main”: “server.js”,
“scripts”: {
“start”: “node server.js”,
“start:dev”: “nodemon server.js”,
“build”: “npm run build”
“keywords”: ,
“author”: “”,
“license”: “ISC”,
“dependencies”: {
“bcrypt”: “^5.1.0”,
“bcrypt-nodejs”: “^0.0.3”,
“clarifai”: “^2.9.1”,
“cors”: “^2.8.5”,
“express”: “^4.18.2”,
“knex”: “^2.4.2”,
“nodemon”: “^2.0.22”,
“pg”: “^8.11.0”

When deploying node file, I saw that the log screen operated same command " > smart-brain-api@1.0.0 build /opt/render/project/src
Jul 8 12:15:46 PM > npm run build" again and again every time and after 4/5 minutes it said ‘build failed’. Pls help me resolve this issue.


I’ve replied to the ticket you also opened. I’ll copy the response here:

You’ve created an infinite loop in your package.json build script:

“build”: “npm run build”

If your application needs a build step, you’ll need to correct the script that’s run.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.