Unique Scenario
Imagine there's a package called xyz-modules
that I've developed. The package.json
file in my project looks like this:
...
"devDependencies": {
"@company/xyz-modules": "latest",
...
}
...
After running the command npm outdated
, here's the output:
Package Current Wanted Latest Location Depended by
@company/xyz-modules 0.1.47 0.1.49 0.1.49 node_modules/@company/xyz-modules ProjectName
The Issue Unfolded
Surprisingly, when I use npm i
on the project, it fails to update the latest changes in the node_modules
. Why is this happening? Strangely enough, only when I specifically run npm i xyz-modules@latest
or simply npm i xyz-modules
, does it successfully install version 0.1.49
and updates latest
to ^0.1.49
in the package.json
.