'How to update an NPM package installed with file://?

I have a local package installed with file: like this:

{
    "devDependencies": {
        "foo": "file:../foo"
    }
}

And I want to update it with npm update foo, after I have updated that module, but turn out nothing happened. How can I update package installed through file: with npm?

npm


Solution 1:[1]

Update your file :) or change file:... -> version (example) ^4.1.1

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 zbyso