axe312ger / sqip

"SQIP" (pronounced \skwɪb\ like the non-magical folk of magical descent) is a SVG-based LQIP technique.
http://axe312ger.github.io/sqip
The Unlicense
3.37k stars 82 forks source link

Probleming running the sqip-command on Mac M1 #253

Closed sndrem closed 2 years ago

sndrem commented 2 years ago

Operating system: macOS Monterey v. 12.5.1

Node version

node -v
v17.9.0

Npm version

npm -v
8.15.0

When running the command sqip -i bilde.jpeg -o bilde.svg -m 1 -n 10 -b 9

I get the error below

TypeError: (0 , _sqip.default) is not a function
    at sqipCLI (/Users/sindre/.nvm/versions/node/v17.9.0/lib/node_modules/sqip-cli/dist/sqip-cli.js:194:29)
    at async /Users/sindre/.nvm/versions/node/v17.9.0/lib/node_modules/sqip-cli/dist/wrapper.js:9:3

Any idea how to get past the problem so I can run the sqip command?

axe312ger commented 2 years ago

can you please try it with node 16?

It works fine on my M1

axe312ger commented 2 years ago

Also, you might have installed the wrong versions of the plugin/packages.

Did you use the command from the readme to install SQIP?

npm install sqip@canary sqip-plugin-primitive@canary sqip-plugin-svgo@canary sqip-plugin-data-uri@canary

sndrem commented 2 years ago

Node 16 + npm install sqip@canary sqip-plugin-primitive@canary sqip-plugin-svgo@canary sqip-plugin-data-uri@canary and npm install -g sqip-cli@canary did the trick for me. Thank you!

nhoizey commented 1 year ago

I have the same issue on a MacBook Air M2 with SQIP Canary and Node 16:

TypeError: (0 , _sqip.default) is not a function
    at sqipCLI (/Users/nicolashoizey/.nvm/versions/node/v16.19.0/lib/node_modules/sqip-cli/dist/sqip-cli.js:194:29)
    at async /Users/nicolashoizey/.nvm/versions/node/v16.19.0/lib/node_modules/sqip-cli/dist/wrapper.js:9:3

I ran

@axe312ger should I open a new issue?

axe312ger commented 1 year ago

@nhoizey if still exists, please new ticket yeah. It works on my M1 though :/