'Private gitlab registry: How can the latest version of a module be installed?

Published modules in gitlab private registry not updating to latest version when run npm install in another app.

Running npm outdated shows the latest version as wanted as below but it's not installing it on npm install.

Package                                     Current | Wanted | Latest                                                 Depended by
@username/package_name                      0.1.9   | 0.1.10 | 0.1.10

I tried with removing node_modules as well as npm install -f but non of seems to work.

Is there anyway to get the latest available module when do a npm install.



Sources

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

Source: Stack Overflow

Solution Source