Npm cache on Windows supplies incorrect dependency versions

We run a lot of node module builds with dependency versions in the module’s package.json as github URLs so we can get early integration of related pull requests.

Quite frequently Windows builds on travis will fail, and the error message suggest that the code that’s been run is not the latest that’s available from the given github URL.

The quick fix is to delete all repository caches for that build and restart the Windows jobs, so it’s definitely cache related but this isn’t great long-term.

I can see how to disable caching for npm, but is it possible to just do it for Windows, or just for dependencies that haven’t been pulled from a registry?

Failing that can the Windows npm caching functionality be fixed so it checks github URLs to ensure the cache should not be invalidated?

This look like an NPM issue to me if it doesn’t correctly determine if dependencies are up to date (or maybe there’s an option to make it do that). Need to see a build to say anything else.

Imprint