chjj / ttystudio

A terminal-to-gif recorder minus the headaches.
Other
3.24k stars 93 forks source link

Old node version: TypeError: Object m has no method 'writeUIntBE' #1

Closed ivanistheone closed 9 years ago

ivanistheone commented 9 years ago

I got one of these

initializing writer
writing image
writing head
TypeError: Object m has no method 'writeUIntBE'
    at GIFWriter.writeBE (/usr/local/lib/node_modules/ttystudio/lib/gif.js:97:7)
    at GIFWriter.writeHead (/usr/local/lib/node_modules/ttystudio/lib/gif.js:134:12)
    at GIFWriter.write (/usr/local/lib/node_modules/ttystudio/lib/gif.js:51:8)
    at SGRWriter.write (/usr/local/lib/node_modules/ttystudio/lib/writer.js:53:22)
    at compile (/usr/local/lib/node_modules/ttystudio/bin/ttystudio:61:10)
    at /usr/local/lib/node_modules/ttystudio/bin/ttystudio:93:12
    at Screen.done (/usr/local/lib/node_modules/ttystudio/lib/record.js:92:7)
    at Screen.EventEmitter._emit (/usr/local/lib/node_modules/ttystudio/node_modules/blessed/lib/events.js:90:20)
    at Screen.EventEmitter.emit (/usr/local/lib/node_modules/ttystudio/node_modules/blessed/lib/events.js:107:17)
    at Program.<anonymous> (/usr/local/lib/node_modules/ttystudio/node_modules/blessed/lib/widgets/screen.js:480:12)
probook:TelcareOperations ivan$ vim /usr/local/lib/node_modules/ttystudio/lib/gif.js

when node -v === v0.10.35 but then upgrading to v0.12.4 and some npm uninstall and reinstall stuff later it works now. Awesome app, BTW.

chjj commented 9 years ago

Yeah, I used to write to buffers the old-fashioned way (with indexing + shifts and ors). I was too used to the first iteration of buffers in node v0.3. With this project I just decided to use the new school API finally. I suppose we could include a shim for older versions of node since it would be a headache to rewrite the GIF and APNG compilers.

rktjmp commented 9 years ago

I got the same issue on v0.10.28. Might be worth mentioning the required node version in the Readme.

molekilla commented 9 years ago

Fails with 0.10.39

SPxiaomin-zz commented 9 years ago

excuse me , when i upgrade my node, i failed , i donnot know what the reason is
i run this command on ubuntu 14.04 sudo n 0.12.4
help me .........
thanks.

chjj commented 9 years ago

Should be fixed for v0.10.x.

HParker commented 9 years ago

Is this released to npm? I am still seeing this error on my system (osx). Fairly sure I have the latest version. Though ttystudio doesn't understand --version.

chjj commented 9 years ago

@HParker, yes. It's released to npm.

$ ttystudio --version
v0.0.11

writeUIntBE no longer appears in the code at all:

$ find . -name '*.js' -print0 | xargs -0 grep writeUIntBE
$
HParker commented 9 years ago

Sounds like I have some system issues I need to resolve. Thank you for your time!