ESM Error while deploying node js on render

My node js application runs perfectly on my vscode terminal but when deploying on render I get this error message in my log:
INFO==> Uploading build…

Feb 1 02:10:43 PMINFO==> Build uploaded in 7s

Feb 1 02:10:43 PMINFO==> Build successful :tada:

Feb 1 02:10:46 PMINFO==> Deploying…

Feb 1 02:14:19 PMINFO==> Using Node version 18.18.2 via /opt/render/project/src/package.json

Feb 1 02:14:19 PMINFO==> Docs on specifying a Node version: Setting Your Node.js Version | Render Docs

Feb 1 02:14:38 PMINFO==> Running β€˜npm start’

Feb 1 02:14:44 PMINFO

Feb 1 02:14:44 PMINFO> server@1.0.0 start

Feb 1 02:14:44 PMINFO> nodemon -r esm server.js

Feb 1 02:14:44 PMINFO

Feb 1 02:14:47 PMINFO[nodemon] 2.0.13

Feb 1 02:14:47 PMINFO[nodemon] to restart at any time, enter rs

Feb 1 02:14:47 PMINFO[nodemon] watching path(s): .

Feb 1 02:14:47 PMINFO[nodemon] watching extensions: js,mjs,json

Feb 1 02:14:47 PMINFO[nodemon] starting node -r esm server.js

Feb 1 02:15:06 PMINFO/Users/user/Desktop/runti-app-server/node_modules/esm/esm.js:1

Feb 1 02:15:06 PMERRORconst global = this;(function (require, module, shared) { var shared;const e=module,t={Array:global.Array,Buffer:global.Buffer,Error:global.Error,EvalError:global.EvalError,Function:global.Function,JSON:global.JSON,Object:global.Object,Promise:global.Promise,RangeError:global.RangeError,ReferenceError:global.ReferenceError,Reflect:global.Reflect,SyntaxError:global.SyntaxError,TypeError:global.TypeError,URIError:global.URIError,eval:global.eval},r=global.console;module.exports=(function(e){var t={};function r(i){if(t[i])return t[i].exports;var n=t[i]={i:i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.d=function(e,t,r){Reflect.defineProperty(e,t,{configurable:!0,enumerable:!0,get:r})},r.n=function(e){return e.a=e,function(){return e}},r(r.s=2)})([(function(e,t){var r;t=e.exports=$,β€œobject”==typeof process&&process,r=function(){},t.SEMVER_SPEC_VERSION=β€œ2.0.0”;var i=256,n=Number.MAX_SAFE_INTEGER||9007199254740991,s=t.re=,a=t.src=,o=0,u=o++;a[u]=β€œ0|[1-9]\d*”;var l=o++;a[l]=β€œ[0-9]+”;var c=o++;a[c]=β€œ\d*[a-zA-Z-][a-zA-Z0-9-]β€œ;var p=o++;a[p]=”(β€œ+a[u]+”)\.(β€œ+a[u]+”)\.(β€œ+a[u]+”)β€œ;var h=o++;a[h]=”(β€œ+a[l]+”)\.(β€œ+a[l]+”)\.(β€œ+a[l]+”)β€œ;var f=o++;a[f]=”(?:β€œ+a[u]+”|β€œ+a[c]+”)β€œ;var d=o++;a[d]=”(?:β€œ+a[l]+”|β€œ+a[c]+”)β€œ;var m=o++;a[m]=”(?:-(β€œ+a[f]+”(?:\.β€œ+a[f]+”)))”;var v=o++;a[v]=β€œ(?:-?(”+a[d]+β€œ(?:\.”+a[d]+β€œ)))β€œ;var g=o++;a[g]=”[0-9A-Za-z-]+β€œ;var y=o++;a[y]=”(?:\+(β€œ+a[g]+”(?:\.β€œ+a[g]+”)))”;var x=o++,b=β€œv?”+a[p]+a[m]+β€œ?”+a[y]+β€œ?”;a=β€œ^”+b+β€œ$”;var w=β€œ[v=\s]β€œ+a[h]+a[v]+”?β€œ+a[y]+”?β€œ,E=o++;a[E]=”^β€œ+w+”$β€œ;var S=o++;a[S]=”((?:<|>)?=?)β€œ;var R=o++;a[R]=a[l]+”|x|X|\”;var P=o++;a[P]=a[u]+β€œ|x|X|\β€œ;var =o++;a[]=”[v=\s](”+a[P]+β€œ)(?:\.(”+a[P]+β€œ)(?:\.(”+a[P]+β€œ)(?:”+a[m]+β€œ)?”+a[y]+β€œ?)?)?”;var k=o++;a[k]=β€œ[v=\s](β€œ+a[R]+”)(?:\.(β€œ+a[R]+”)(?:\.(β€œ+a[R]+”)(?:β€œ+a[v]+”)?β€œ+a[y]+”?)?)?β€œ;var I=o++;a[I]=”^β€œ+a[S]+”\s”+a[]+β€œ$”;var A=o++;a[A]=β€œ^”+a[S]+β€œ\s*”+a[k]+β€œ$”;var N=o++;a[N]=β€œ(?:^|[^\d])(\d{1,16})(?:\.(\d{1,16}))?(?:\.(\d{1,16}))?(?:$|[^\d])”;var C=o++;a[C]=β€œ(?:~>?)”;var O=o++;a[O]=β€œ(\s*)”+a[C]+β€œ\s+”,s[O]=RegExp(a[O],β€œg”);var T=o++;a[T]=β€œ^”+a[C]+a[]+β€œ$”;var M=o++;a[M]=β€œ^”+a[C]+a[k]+β€œ$”;var L=o++;a[L]=β€œ(?:\^)”;var D=o++;a[D]=β€œ(\s*)”+a[L]+β€œ\s+”,s[D]=RegExp(a[D],β€œg”);var F=o++;a[F]=β€œ^”+a[L]+a[]+β€œ$”;var j=o++;a[j]=β€œ^”+a[L]+a[k]+β€œ$”;var V=o++;a[V]=β€œ^”+a[S]+β€œ\s*(”+w+β€œ)$|^$”;var G=o++;a[G]=β€œ^”+a[S]+β€œ\s*(”+b+β€œ)$|^$”;var B=o++;a[B]=β€œ(\s*)”+a[S]+β€œ\s*(”+w+β€œ|”+a[]+β€œ)”,s[B]=RegExp(a[B],β€œg”);var U=o++;a[U]=β€œ^\s*(”+a[]+β€œ)\sΒ±\s+(”+a[]+β€œ)\s*$”;var W=o++;a[W]=β€œ^\s*(”+a[k]+β€œ)\sΒ±\s+(”+a[k]+β€œ)\s*$”;var q=o++;a[q]=β€œ(<|>)?=?\s*\*”;for(var z=0;z<35;z++)r(z,a[z]),s[z]||(s[z]=RegExp(a[z]));function H(e,t){β€œuse strict”;if(t&&β€œobject”==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof $)return e;if(β€œstring”!=typeof e)return

please any help here

Hello Please anyone with a solution please.

Hi there,

This path wouldn’t exist on your Render service: /Users/user/Desktop/runti-app-server/node_modules/esm/esm.js:1

Are you committing node_modules to Git? If so, please remove this folder and add it to your .gitignore file. You should run npm install or similar command to install your Node modules as part of your Redner build process.

If you need any further assistance please open a ticket from our dashboard. We can’t give you specific advice for your service through your community post.

Regards,

Keith
Render Support, UTC+10 :australia: