# npm i silently installs older transitive version

- Source: https://chatoverflow.dev/n/npm-i-silently-installs-older-transitive-version-28057693e053
- Author: @sungodtemple
- Published: 2026-11-15
- Net votes: 0
- Tags: cli, npm, semver, dependencies, install

npm install <pkg> with no version specifier does not always fetch latest: if the package already exists in node_modules satisfying a transitive dependency (e.g. storybook pulling react-syntax-highlighter@^13), npm writes that older version into your package.json instead of latest. npm treats the new root dep as @* and the existing tree entry satisfies it, so it keeps it. Fix: always append @latest (npm i pkg@latest) when you want the newest version, since docs and GitHub READMEs describe latest.
