nibblebot / sublime-js2coffee

:warning: UNMAINTAINED :warning:
MIT License
30 stars 8 forks source link

Cannot read property 'length' of undefined #11

Open zerobatu opened 11 years ago

zerobatu commented 11 years ago

I try to convert js to coffee with this plugin and the console show this error

TypeError: Cannot read property 'length' of undefined at /usr/local/lib/node_modules/js2coffee/lib/helpers.coffee:113:29 at Object. (/usr/local/lib/node_modules/js2coffee/lib/helpers.coffee:120:5) at Object. (/usr/local/lib/node_modules/js2coffee/lib/helpers.coffee:156:4) at Module._compile (module.js:449:26) at Object.loadFile (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/coffee-script.js:24:19) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:362:17) at require (module.js:378:17) at Object. (/usr/local/lib/node_modules/js2coffee/lib/js2coffee.coffee:13:36) at Object. (/usr/local/lib/node_modules/js2coffee/lib/js2coffee.coffee:1081:4) at Module._compile (module.js:449:26) at Object.loadFile (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/coffee-script.js:24:19) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:362:17) at require (module.js:378:17) at Object. (/usr/local/lib/node_modules/js2coffee/lib/command.coffee:4:15) at Object. (/usr/local/lib/node_modules/js2coffee/lib/command.coffee:222:4) at Module._compile (module.js:449:26) at Object.loadFile (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/coffee-script.js:24:19) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:362:17) at require (module.js:378:17) at Object. (/usr/local/lib/node_modules/js2coffee/bin/js2coffee:10:3) at Object. (/usr/local/lib/node_modules/js2coffee/bin/js2coffee:12:4) at Module._compile (module.js:449:26) at Object.exports.run (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/coffee-script.js:124:25) at compileScript (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/command.js:166:29) at fs.stat.notSources.(anonymous function) (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/command.js:141:18) at fs.readFile (fs.js:176:14) at Object.oncomplete (fs.js:297:15)

i have ubuntu with node -> coffee-script and js2coffee

ghost commented 11 years ago

+1 am also getting this

ghost commented 11 years ago

Seems it's a js2coffee issue

ghost commented 11 years ago

Solved at https://github.com/rstacruz/js2coffee/issues/189

watkinshughes commented 11 years ago

I see virtually the same error in OSX 10.7.5 with node -> coffee-script + js2coffee

rstuven commented 11 years ago

@zerobatu @propercursive See @michaelzibmz's workaround here: https://github.com/rstacruz/js2coffee/issues/189#issuecomment-14611812

hsnmtw commented 11 years ago

I received this error which is kind of simillar

TypeError: Cannot read property 'length' of undefined
  at /usr/local/lib/node_modules/js2coffee/lib/helpers.coffee:118:29
  at Object. (/usr/local/lib/node_modules/js2coffee/lib/helpers.coffee:125:5)
  at Object. (/usr/local/lib/node_modules/js2coffee/lib/helpers.coffee:162:4)
  at Module._compile (module.js:449:26)
  at Object.loadFile (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/coffee-script.js:179:19)
  at Module.load (module.js:356:32)
  at Function.Module._load (module.js:312:12)
  at Module.require (module.js:362:17)
  at require (module.js:378:17)
  at Object. (/usr/local/lib/node_modules/js2coffee/lib/js2coffee.coffee:13:36)
  at Object. (/usr/local/lib/node_modules/js2coffee/lib/js2coffee.coffee:1127:4)
  at Module._compile (module.js:449:26)
  at Object.loadFile (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/coffee-script.js:179:19)
  at Module.load (module.js:356:32)
  at Function.Module._load (module.js:312:12)
  at Module.require (module.js:362:17)
  at require (module.js:378:17)
  at Object. (/usr/local/lib/node_modules/js2coffee/lib/command.coffee:4:15)
  at Object. (/usr/local/lib/node_modules/js2coffee/lib/command.coffee:234:4)
  at Module._compile (module.js:449:26)
  at Object.loadFile (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/coffee-script.js:179:19)
  at Module.load (module.js:356:32)
  at Function.Module._load (module.js:312:12)
  at Module.require (module.js:362:17)
  at require (module.js:378:17)
  at Object. (/usr/local/lib/node_modules/js2coffee/bin/js2coffee:7:1, :10:3)
  at Object. (/usr/local/lib/node_modules/js2coffee/bin/js2coffee:12:4)
  at Module._compile (module.js:449:26)