1000ch / atom-svgo

Minify SVG with SVGO 🐯
https://atom.io/packages/svgo
MIT License
14 stars 5 forks source link

svgo ENOENT #5

Closed jerone closed 8 years ago

jerone commented 8 years ago

I just installed this package and it is erroring on me every time I minify or prettify an SVG file:

Error: spawn C:\Users\<user>\.atom\packages\svgo\node_modules\.bin\svgo ENOENT(…)(anonymous function) @ /C:/Users/<user>/.atom/packages/svgo/index.js:35

Atom 1.7.1 Windows 8.1 x64 svgo 2.0.0

jerone commented 8 years ago

Still happening... Is there anything else I can provide?

Atom 1.8.0 Windows 8.1 x64 svgo 2.0.1

jerone commented 8 years ago

Ah found the issue... here you are referencing the svgo file in the bin folder, but Windows :checkered_flag: requires the svgo.cmd file.

Changing that line to the following fixed my issue:

const SVGO_PATH = normalize(join(__dirname, 'node_modules', '.bin', 'svgo.cmd'));
1000ch commented 8 years ago

@jerone Thank you for reporting and debugging. Would you update this package to v2.1.1 and check still having the error?

jerone commented 8 years ago

@1000ch commented on 17 jun. 2016 12:49 CEST:

@jerone

Thank you for reporting and debugging.

Would you update this package to v2.1.1 and check still having the error?

Still failing, which makes sense because the check for svgo returns true, because the file exists on Windows too (it's part of that package).

I think an OS check would solve this...

1000ch commented 8 years ago

@jerone Ah, this was too bad... Please update again? 🙏

jerone commented 8 years ago

:+1: Yes confirmed working!