Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property 'length' of undefined #11

Open
zerobatu opened this issue Mar 5, 2013 · 6 comments
Open

Cannot read property 'length' of undefined #11

zerobatu opened this issue Mar 5, 2013 · 6 comments

Comments

@zerobatu
Copy link

zerobatu commented Mar 5, 2013

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
Copy link

ghost commented Mar 9, 2013

+1 am also getting this

@ghost
Copy link

ghost commented Mar 9, 2013

Seems it's a js2coffee issue

@ghost
Copy link

ghost commented Mar 9, 2013

Solved at js2coffee/js2coffee#189

@watkinshughes
Copy link

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

@rstuven
Copy link

rstuven commented Mar 12, 2013

@zerobatu @propercursive See @michaelzibmz's workaround here: js2coffee/js2coffee#189 (comment)

@hsnmtw
Copy link

hsnmtw commented Jun 1, 2013

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants