If the node_modules
directory doesn't exist in your current directory, NPM will look for it in the higher directories until it finds it. So, if the parent directory has a node_modules
directory, NPM will assume that's where it is to install modules.
A quick way around this is to create an empty node_modules
directory where you want the modules to be placed.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…