konsumer / inkscape-svgo

Plugin to optimize SVGs in inkscape
73 stars 7 forks source link

Ubuntu snap install not working #4

Closed shaneonabike closed 5 years ago

shaneonabike commented 5 years ago

Hey!

Thanks for building an awesome tool to incorporate svgo. I have yet to test out the results because I ran into this weirdo problem. When I use the defaults that you have this is what I get for an output.

I'm using Inkspace 0.92 and do have nodejs (although I don't know if I actually need that since you are shipping it as an exe).

`dns.js:246 this._handle = new ChannelWrap(); ^

Error: EFILE at new Resolver (dns.js:246:20) at dns.js:377:23 at NativeModule.compile (bootstrap_node.js:636:7) at NativeModule.require (bootstrap_node.js:581:18) at net.js:45:13 at NativeModule.compile (bootstrap_node.js:636:7) at NativeModule.require (bootstrap_node.js:581:18) at createWritableStdioStream (internal/process/stdio.js:163:17) at process.getStdout [as stdout] (internal/process/stdio.js:14:14) at console.js:249:38 `

shaneonabike commented 5 years ago

For what it's worth I can actually select Save As.. and run everything I just get this error message when it's attempting to export (to be clearer).

konsumer commented 5 years ago

Some versions of node appear to require networking, even though I'm not using it at all. I upgraded builds to use node10. Try out latest release. When you say "Ubuntu snap install", how do you mean?

If that doesn't work, on linux (I use Pop!OS, which is based on Ubuntu) I just use the source.

First, upgrade node to latest:

curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt-get install -y nodejs

Next install inkscape-svgo in your path with sudo npm i -g inkscape-svgo. Make sure you can run it (you will get an error, but the command must be found in your path.)

Finally, put inkscape-svgo.inx in ~/.config/inkscape/extensions/

shaneonabike commented 5 years ago

Hmmm I did as you indicated but now the extension isn't really appearing as a save option. Looking at the built inx file there doesn't seem to be a compiled file. This is fine but I feel like something is missing?

shaneonabike commented 5 years ago

Actually I downloaded your latest extension pre-built and all is awesome thanks so much!