imagemin / gif2webp-bin

gif2webp bin-wrapper that makes it seamlessly available as a local dependency

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

install failed

Jeff1983 opened this issue · comments

I run 'npm install gif2webp-bin' on windows and redhat7, both failed.
Then I copy gif2webp.exe to vender/ , it works

Why ?

I can confirm this issue. And since the typo is not fixed yet, here's a workaround.

Issue
When installing gif2webp-bin or imagemin-gif2webp (which installs it as a dependency), my Windows 10 system gave this error:

> gif2webp-bin@3.0.1 postinstall C:\Users\**username**\AppData\Roaming\npm\node_modules\gif2webp-bin
> node lib/install.js
  ‼ Response code 404 (Not Found)
  ‼ gif2webp pre-build test failed

Then it tries to compile from source but can't, giving the error:

  i compiling from source
  × UnsupportedProtocolError: Unsupported protocol "c:"

This second error has probably to do with a different Windows related issue, but anyway. I put it here for completeness and others (like me) who where searching for this error for too long. ;)

Solution
Changing the typo, as suggested in the attached pull request, fixes the first error.

Temporary workaround
Until the typo is fixed, this was my workaround:

  1. Install gif2webp-bin globally:
npm install --global gif2webp-bin

(This wil throw the error as above.)

  1. Correct the typo inside C:\Users\**username**\AppData\Roaming\npm\node_modules\gif2webp-bin\lib\index.js
  2. Manually run the postinstall script again:
C:\Users\**username**\AppData\Roaming\npm\node_modules\gif2webp-bin> node lib/install.js
√ gif2webp pre-build test passed successfully