pnpm / supi

Fast, disk space efficient installation engine. Used by pnpm
MIT License
24 stars 5 forks source link

Cannot install `file://...tgz` references from Shrinkwrap #10

Closed nickpape closed 7 years ago

nickpape commented 7 years ago

pnpm version: 1.10.2

Code to reproduce the issue:

Create a package.json file referencing some local .TGZ files, e.g.:

Z:/project/package.json:

{
   ...
   dependencies: {
      "foo": "./projects/foo.tgz"
   }
   ....
}

Run pnpm install. Everything succeeds.

Re-run pnpm install, this time it will use the shrinkwrap.yaml

Expected behavior:

Everything installs correctly.

Actual behavior:

PNPM does not use the relative path:

Error, could not find file:
  Z:/projects/foo.tgz

I did some digging and I believe this is caused by the packages/resolution/tarball field not being a relative path. Additionally, it appears that the specifiers needs to NOT have a relative path (otherwise the dependency field, which is NOT using a relative path, does not match anything in the shrinkwrap and it tries to find the tgz at that location).

Additional information:

zkochan commented 7 years ago

I reproduced it. I'll fix it this week. Maybe even today.

zkochan commented 7 years ago

@nickpape-msft, fix landed in pnpm@1.11.1

nickpape commented 7 years ago

Thanks @zkochan !