tmpvar / svgmill

14 stars 1 forks source link

readme example doesn't work #1

Closed dominictarr closed 5 years ago

dominictarr commented 11 years ago

I was quite excited to see this, but then this happened:

curl http://www.clker.com/cliparts/O/H/c/W/A/o/plane.svg | svgmill -i
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--  100  2323  100  2323    0     0   6386      0 --:--:-- --:--:-- --:--:-- 13827

/Users/dominictarr/.nave/installed/0.10.10/lib/node_modules/svgmill/bin/run.js:58
    var ax = paths[0][1].x - paths[0][0].x,
                     ^
TypeError: Cannot read property '1' of undefined
    at Socket.<anonymous> (/Users/dominictarr/.nave/installed/0.10.10/lib/node_modules/svgmill/bin/run.js:58:22)
    at Socket.EventEmitter.emit (events.js:117:20)
    at _stream_readable.js:910:16
    at process._tickCallback (node.js:415:13)
aniketsjagtap commented 5 years ago

I also have the same issue. Please Help!!!

C:\Users\aniket>npm curl http://www.clker.com/cliparts/O/H/c/W/A/o/plane.svg | svgmill -i [] C:\Users\aniket\AppData\Roaming\npm\node_modules\svgmill\bin\run.js:59 var ax = paths[0][1].x - paths[0][0].x, ^

TypeError: Cannot read property '1' of undefined at Socket. (C:\Users\aniket\AppData\Roaming\npm\node_modules\svg ill\bin\run.js:59:22) at emitNone (events.js:111:20) at Socket.emit (events.js:208:7) at endReadableNT (_stream_readable.js:1064:12) at _combinedTickCallback (internal/process/next_tick.js:139:11) at process._tickCallback (internal/process/next_tick.js:181:9)

tmpvar commented 5 years ago

I believe this is fixed in 64f4210 and I've published v0.0.2 on npm

let me know if this doesn't solve the issue


‣ npm install -g svgmill
/usr/local/bin/svgmill -> /usr/local/lib/node_modules/svgmill/bin/run.js
+ svgmill@0.0.2
updated 1 package in 1.277s
‣ curl http://www.clker.com/cliparts/O/H/c/W/A/o/plane.svg | svgmill -i
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2323  100  2323    0     0  31832      0 --:--:-- --:--:-- --:--:-- 32263
G1 Z1
M4 S6000
G1 Z1 F200
G1 Z1.1 F200
G1 Z1.2 F200
G1 Z1.3 F200
G1 Z1.4 F200
G1 Z1.5 F200
G1 Z1.6 F200
G1 Z1.7 F200
G1 Z1.7999999999999998 F200
...
dominictarr commented 5 years ago

it worked! thanks @tmpvar