When I try to install npm package using command npm i -d <package-name>, it always listing the package inside dependencies instead of devDependencies. It works before, but I suddenly get this problem without knowing what is causing it.
I have tried to reset NODE_ENV (I am not sure if this is related since I use windows), deleting package.lock.json, uninstall VSCode's extensions, cleaning npm cache reinstall the node_modules and even reinstall NODEJs, but the problem still persist.
Does anyone know the solution?
devDependenciesyou must use-Dinstead of-d