Refactor of npm loading logic and removing npm dedupe as it doesn't seem to work OK.