Closed aadamowski closed 12 years ago
I have not been able to reproduce this (using node 0.6.5).
What does your html2jade installed dependency look like? Mine is:
html2jade@0.1.2 /Users/don/dev/github/html2jade
├── commander@0.4.1
└─┬ jsdom@0.2.10
├── contextify@0.0.6
├── cssom@0.2.1
├── htmlparser@1.7.3
└── request@2.2.5
Hold on. updating commander
to 0.5 broke something.
I think I got it. Try version 0.1.4 by getting the latest from npm repo.
Problem was commander
0.5 passing an extra argument of type Object
.
Unexpected behavior change in updates is always a joy.
Anyway, bug should be gone now.
Works now, thanks :)
Standard html2jade 0.1.0 either npm install, or from github src :
$ html2jade http://www.mcli.dist.maricopa.edu/tut/tut1.html
node.js:134 throw e; // process.nextTick error, or 'error' event on first tick ^ TypeError: Converting circular structure to JSON at Object.stringify (native) at Command. (/home/nodejs/.node_libraries/.npm/html2jade/0.1.2/package/bin/html2jade:54:51)
at Command. (/home/nodejs/.node_libraries/.npm/commander/0.5.0/package/lib/commander.js:232:8)
at Command.emit (events.js:64:17)
at Command.parseArgs (/home/nodejs/.node_libraries/.npm/commander/0.5.0/package/lib/commander.js:401:12)
at Command.parse (/home/nodejs/.node_libraries/.npm/commander/0.5.0/package/lib/commander.js:349:15)
at Object. (/home/nodejs/.node_libraries/.npm/html2jade/0.1.2/package/bin/html2jade:95:9)
at Module._compile (module.js:402:26)
at Object..js (module.js:408:10)
at Module.load (module.js:334:31)
Seems that the cause is this line:
console.log("default action invoked: " + JSON.stringify(arguments));
Since it's just a debug message, we can try to comment it out.
Then it goes further, but still fails at line 70:
$ ./bin/html2jade http://www.mcli.dist.maricopa.edu/tut/tut1.html options: {"scalate":false}
node.js:134 throw e; // process.nextTick error, or 'error' event on first tick ^ TypeError: Object # has no method 'match'
at Object.urlParse as parse
at Command. (/home/nodejs/src/html2jade/bin/html2jade:70:15)
at Command. (/home/nodejs/.node_libraries/.npm/commander/0.5.0/package/lib/commander.js:232:8)
at Command.emit (events.js:64:17)
at Command.parseArgs (/home/nodejs/.node_libraries/.npm/commander/0.5.0/package/lib/commander.js:401:12)
at Command.parse (/home/nodejs/.node_libraries/.npm/commander/0.5.0/package/lib/commander.js:349:15)
at Object. (/home/nodejs/src/html2jade/bin/html2jade:95:9)
at Module._compile (module.js:402:26)
at Object..js (module.js:408:10)
at Module.load (module.js:334:31)
Possibly an incompatibility with the latest commander version?