Mac OS > sh: del: command not found. What is the Mac equivalent of Windows del?

Viewed 26

I am facing an issue on Mac OS with an npm script in the package.json of a shared app that is mostly run on Windows PCs.

Here is the package.json script:

"postinstall": "del node_modules\\@angular\\compiler-cli\\ngcc\\__ngcc_lock_file__ && ngcc",

When I run npm run postinstall on Mac OS, I get the following error:

sh: del: command not found

Is there a mac equivalent to "del" that I can use to create a mac friendly version of this command?

"postinstall-mac": "??? node_modules\\@angular\\compiler-cli\\ngcc\\__ngcc_lock_file__ && ngcc",

1 Answers

Update: Looks like the solution is rimraf. So to resolve, I just created a new line for Mac use and left the existing as is:

"postinstall-mac": "rimraf node_modules\\@angular\\compiler-cli\\ngcc\\__ngcc_lock_file__ && ngcc",

Related