This repository has been archived by the owner. It is now read-only.

git+ssh installs write to the cache incorrectly in 1.5.0-alpha-4 #5752

Raynos opened this Issue Jul 22, 2014 · 2 comments


None yet
3 participants

Raynos commented Jul 22, 2014

When installing a dependency with a git+ssh uri it will be incorrectly installed into the npm cache.

cd ~/tmp
mkdir foo
cd foo
npm init
npm i git+ssh:// --save
npm cache ls mercury # expect mercury in cache
cat ~/.npm/mercury/5.2.1/package/package.json | grep 'ssh://'
# expected _resolved to be git+ssh:// not ssh://
cat ./node_modules/mercury/packages | grep _resolved
# expected _resolved to be git+ssh:// not ssh://

The _resolved field in the cache is incorrectly truncated to ssh:// instead of git+ssh://.
It's also incorrectly truncated when installing into node_modules

This causes a bug where npm ls will say " Unsupported URL Type: ssh://"

When looking at install.js I see


This comment has been minimized.

donaldpipowitch commented Jul 22, 2014

I can confirm this bug.

@othiym23 othiym23 added this to the 2.0.0 milestone Jul 23, 2014

@isaacs isaacs closed this in 6c47201 Aug 21, 2014


This comment has been minimized.


Raynos commented Aug 21, 2014

@isaacs @othiym23 thanks :)

I'll try the new alpha this week

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.