`rimraf` as `devDependency` requires non-dev dependency `glob`
joeyaurel opened this issue · 2 comments
joeyaurel commented
Problem
In my setup I want to use rimraf
only as a devDependency
since I only want to use it in my build environment when removing a dist/
directory to then re-build into that directory.
Problem is that rimraf
requires glob
as a non-dev dependency which won't be installed when only dev dependencies should be installed for the build environment (via npm install --only=development
or when NODE_ENV
is set to development
).
Possible solution
Is there any chance to make glob
optional (#181) or also install it as a dev dependency, when rimraf
is getting installed as a dev dependency? (Don't actually know the second is even possible.)
Alternatives
- Installing
rimraf
as a global non-dev dependency before installing only dev dependencies while havingrimraf
installed as a non-dev dependency within thepackage.json
file - Installing ALL dependencies in the build environment (which is not want I want).
rm -rf
nmabhinandan commented
Did you get any solution to this?
kalaschnik commented
Installed this in 2022. Works as a dev dependency out of the box