Getting Error While Trying to Deploy Latest Commit

I have deployed my MERN app and it is working well at Render free service for test purposes but after some small latest revisions on my app (just error message changes and a new condition to an if check), I couldn’t redeploy it with the latest deploy. In the beginning, it gave something like No Enough Disk Space, then started to give “tsc” not found error and now still gives the following errors :
sh: 1: tsc: not found
Jan 23 01:21:13 AM npm ERR! code ELIFECYCLE
Jan 23 01:21:13 AM npm ERR! syscall spawn
Jan 23 01:21:13 AM npm ERR! file sh
Jan 23 01:21:13 AM npm ERR! errno ENOENT
Jan 23 01:21:13 AM npm ERR! periopsisv1@1.0.0 postinstall: tsc
Jan 23 01:21:13 AM npm ERR! spawn ENOENT

Is there any way to solve this problem?

ive been having the same exact issue for the past few hours and im losing my mind over it.

1 Like

Did you ever figure out the issue?

Still having the same problem, tried to change the package JSON script from post-install to npm install && tsc
did not work for me. Planning to delete the web service and try to create it again but on the other hand, I am worried because if it gives the same problem after the delete process, test processes for the current version will also stop.

Hi;

The problem was from NODE_ENV, I have assigned it to production and it was creating the problem. NODE_ENV = production and hence npm install was not installing the tsc and as a result it couldn’t find the tsc. I removed NODE_ENV production from env and it installed tsc and deployed without a problem.

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