dmtrKovalenko / odiff

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Install fails on Windows CI

wimme opened this issue · comments

While it works locally, it fails to install on our CI Jenkins (Windows):

package.json:
"dependencies": { "odiff-bin": "^2.1.1" }

log:

odiff-bin@2.1.1 postinstall C:\Jenkins\workspace\Web\CubeMobileApps@3\Webpages\CubeMobileApps\node_modules\odiff-bin
node ./postinstall.js
Couldn't find C:\Jenkins\workspace\Web\CubeMobileApps@3\Webpages\CubeMobileApps\node_modules\odiff-bin\platform-windows-x64\bin\odiff trying with .exe
error: Esy prefix path is too deep in the filesystem, Esy won't be able to relocate artefacts
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! odiff-bin@2.1.1 postinstall: node ./postinstall.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the odiff-bin@2.1.1 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

As this is a shared CI setup with other projects, we can't change the directory containing the pipeline workspaces.

Could you please verify if file odiff.exe exists in the file system?

Just verified, the file odiff.exe does exist in:

  • node_modules\odiff-bin\platform-windows-x64\bin\odiff.exe
  • node_modules\odiff-bin\bin\odiff.exe

@dmtrKovalenko
Looks like this issue: esy/esy#705. I guess the PR which relaxes this constraint is not merged yet.
Edit: It is released. We just have to set "esy.release.rewritePrefix" to false. I don't know if this has any oher implications though.

@wimme
The issue is, that the filepath is too deep.
Could you try again with a path further up in your filesystem or are you limited by the ci envionment?

Our shared CI environment is in production so it's not an option to change it. I also found that Esy issue and figured it had to do with the file path, as it does install correctly on our developer machines where the file path is not that deep. I'm not familiar with Esy and how that works, but for the use case of installing ODiff I would not expect that the file path has to be limited...

I was able to reproduce this locally and implemented a fix in #30.
The fix will be included in the next release.

Thank you for reporting the issue @wimme!

@eWert-Online Thank you for the quick fix! Much appreciated.