hnpwa-firebase
hnpwa-firebase copied to clipboard
Errors when running "npm run build" - 'rm' is not recognized
[email protected] build:clean C:\Users\albot\web\hnpwa-firebase-master rm -rf dist
'rm' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build:clean: rm -rf dist
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build:clean script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
What kind of machine are you on?
Windows 10. I think is one of the node_modules that should be installed globally.
the root cause here is that rm is not a valid windows system command. there are ways in windows to recursively delete directories and their content but the *nix style command rm -rf is not one of them.
Any idea how to fix this issue?
Using rmdir /s
along with of rm -rf
? Like rm -rf || rmdir /s
or even using https://www.npmjs.com/package/rimraf
Using
rmdir /s
along with ofrm -rf
? Likerm -rf || rmdir /s
or even using https://www.npmjs.com/package/rimraf
did it work?
I haven't got a Windows machine to tell you, but that should work.