Closed azilnik closed 9 years ago
Hi! I just merged a PR which may fix this issue. Can you give it another shot?
Same here.
/Personal/TurnstileData/server/node_modules/mta-turnstiles/lib/streams/turnstile.js:19
exits: line.shift().trim()
^
TypeError: Cannot call method 'trim' of undefined
at parseLine (/Personal/TurnstileData/server/node_modules/mta-turnstiles/lib/streams/turnstile.js:19:27)
at /Personal/TurnstileData/server/node_modules/mta-turnstiles/lib/streams/turnstile.js:49:5
at Array.forEach (native)
at TurnstileStream._transform (/Personal/TurnstileData/server/node_modules/mta-turnstiles/lib/streams/turnstile.js:48:14)
at TurnstileStream.Transform._read (_stream_transform.js:179:10)
at TurnstileStream.Transform._write (_stream_transform.js:167:12)
at doWrite (_stream_writable.js:226:10)
at writeOrBuffer (_stream_writable.js:216:5)
at TurnstileStream.Writable.write (_stream_writable.js:183:11)
at Request.ondata (stream.js:51:26)```
I just updated the package on npm. Looks like it is fixed now.
If not, can you give me the command you are running this with?
Works like a charm. Thanks!
I have Node installed. I am trying to run this app on a URL, to see if it works. I keep getting an error with the trim() function.
.../turnstile.js:19 exits: line.shift().trim() ^ TypeError: Cannot call method 'trim' of undefined at parseLine (/Users/ari.zilnik/Hadoop/hdfs-testing/node_modules/mta-turnstiles/lib/streams/turnstile.js:19:27) at /Users/ari.zilnik/Hadoop/hdfs-testing/node_modules/mta-turnstiles/lib/streams/turnstile.js:49:5 at Array.forEach (native) at TurnstileStream._transform (/Users/ari.zilnik/Hadoop/hdfs-testing/node_modules/mta-turnstiles/lib/streams/turnstile.js:48:14) at TurnstileStream.Transform._read (_stream_transform.js:179:10) at TurnstileStream.Transform._write (_stream_transform.js:167:12) at doWrite (_stream_writable.js:225:10) at writeOrBuffer (_stream_writable.js:215:5) at TurnstileStream.Writable.write (_stream_writable.js:182:11) at Request.ondata (stream.js:51:26)