kesla / jade-to-handlebars

9 stars 9 forks source link

ReferenceError: opt is not defined #2

Closed atonb117 closed 8 years ago

atonb117 commented 8 years ago

Greetings.

When given the jade-to-handlebars command, it threw this error:

yammy@fedora01:~/jadeWork/testConversion/views$ jade-to-handlebars
/usr/local/lib/node_modules/jade-to-handlebars/lib/walk.js:71
      (opts && opts.filename ? ' in ' + opt.filename : '')
                                        ^

ReferenceError: opt is not defined
    at walk (/usr/local/lib/node_modules/jade-to-handlebars/lib/walk.js:71:41)
    at Array.map (native)
    at walk (/usr/local/lib/node_modules/jade-to-handlebars/lib/walk.js:12:22)
    at module.exports (/usr/local/lib/node_modules/jade-to-handlebars/index.js:10:14)
    at /usr/local/lib/node_modules/jade-to-handlebars/bin/jade-to-handlebars.js:11:20
    at Array.forEach (native)
    at Object.<anonymous> (/usr/local/lib/node_modules/jade-to-handlebars/bin/jade-to-handlebars.js:8:24)
    at Module._compile (module.js:435:26)
    at Object.Module._extensions..js (module.js:442:10)
    at Module.load (module.js:356:32)

There are 3 .jade files in the directory and three folders. After command/error, there is no change.

kesla commented 8 years ago

@atonb117 Any chance you can share the jade files or give some more information around your setup?

DJviolin commented 8 years ago

I also got the same error.

I tried to convert these files: https://github.com/jsantell/poet/tree/master/examples/views

gstavrev commented 8 years ago

I was running into a similar issue. Looks like typo in the walk file, new PR: https://github.com/kesla/jade-to-handlebars/pull/4

The files that had that issue for me were ones with the block tag from jade. Haven't had much experience with jade, but encountered this tool when switching my project to use handlebars with ember.