Deploy Error rimraf not found

Hey there, I am trying to host a Discord Bot on Render, which currently is successfully hosted on Heroku. I am facing a problem during deploy where Render tells me rimraf is not found.

The build command runs this: rimraf dist && tsc --project tsconfig.json
when I set npm run build under build in settings it gives me the error

rimraf is part of devdependancies in package.json, what am I missing?

Aug 4 06:59:39 PM  
Aug 4 06:59:39 PM  > robo@1.0.0 build
Aug 4 06:59:39 PM  > rimraf dist && tsc --project tsconfig.json
Aug 4 06:59:39 PM  
Aug 4 06:59:39 PM  sh: 1: rimraf: not found

Hi there,

Thanks for reaching out.

We usually see this kind of issue when the install step is missing from the Build Command, are you installing the dependencies before trying to run them? For example, a Build Command should probably be something like:

npm install; npm build;

If your dependencies are in devDependencies of the package.json you may also need to check they’re being installed as the NODE_ENV can change what is installed. npm install docs

Hope that helps

Alan

1 Like

Thanks, it helped to first do the npm install :slight_smile:

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