dmtrKovalenko / odiff

The fastest pixel-by-pixel image visual difference tool in the world.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bug: can't install using pnpm

privatenumber opened this issue · comments

Description

Can't install odiff-bin using pnpm: Esy prefix path is too deep in the filesystem, Esy won't be able to relocate artefacts

Installing using npm works fine though.

Stderr:

$ pnpm i odiff-bin

Packages: +1
+
Downloading registry.npmjs.org/odiff-bin/2.2.0: 12.3 MB/12.3 MB, done
Packages are hard linked from the content-addressable store to the virtual store.
  Content-addressable store is at: /Users/privatenumber/.pnpm-store/v3
  Virtual store is at:             node_modules/.pnpm
Progress: resolved 1, reused 0, downloaded 1, added 1, done
node_modules/.pnpm/odiff-bin@2.2.0/node_modules/odiff-bin: Running postinstall script, failed in 166ms
.../node_modules/odiff-bin postinstall$ node ./postinstall.js
│ error: Esy prefix path is too deep in the filesystem, Esy won't be able to relocate artefacts
└─ Failed in 166ms
 ERROR  Command failed with exit code 1.

Reproduction steps

  1. Make a new directory and cd into it
  2. npm init
  3. pnpm i odiff-bin (If you don't have pnpm installed, you can use npx: npx pnpm i odiff-bin)

Environment info

macOS Big Sur v11.3.1

$ node -v
v14.16.1
$ pnpm -v
6.2.1

Looks like #29 is not fixed :(

Which OS you are using?

Provided above: macOS Big Sur v11.3.1

@dmtrKovalenko
The Problem is this line:
https://github.com/dmtrKovalenko/odiff/blob/main/.ci/release-postinstall.js#L18

We did remove the rewritePrefix from the package.json, which removes this environment variable from esy's postinstall script.
We are however setting it again in our "custom" postinstall. I didn't notice this in #30 ... and it was fixed for npm / yarn, which is a bit weird 🤔.
As soon as we remove this line, it should work fine.

I don't have much time right now, but I will test this and send a PR later today.

Thank you for the quick fix! Looking forward to trying it out.