npm's save-prefix setting affects which prefix is set in package.json
when running npm install -D <package>
- by default it's set to a caret (^
).
So yes it's odd some packages have been prefixed with ^
whilst others haven't.
Perhaps via the npm-config command you inadvertently ran npm config set save-prefix=''
(i.e. you set it to nothing).
If you run npm config get save-prefix
and it doesn't print ^
, then you need to run npm config delete save-prefix
to revert to the default ^
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…