Closed evil-shrike closed 10 years ago
i've got a feeling that's coming from jsdoc.. do you have jsdoc installed? if so, could you try running jsdoc against your source and see if you get same issue? failing that, please send over a gist of the source file causing breakage..
could you post some code to help me reproduce this?
No, I don't have jsdoc3 installed. It's hard to figure out what cause the error - that's because I fired the bug. It would be nice to report file name at least.
i agree it would be nice to report the file name - i do want to improve the exception reporting.. but in order to do that i need an exception to work with.. if you get another error like this, please let me know
Hi. Here some details. Hope it it helps a bit.
C:\Work\R-n-D\xfw3_webclient\Client\src\lib>call jsdoc2md core.lang.js --verbose > core.lang.md
TypeError: Parameter 'url' must be a string, not undefined
at Url.parse (url.js:107:11)
at Object.urlParse [as parse] (url.js:101:5)
at Object.linkTo (C:\Users\Shrike\AppData\Roaming\npm\node_modules\jsdoc-to-markdown\node_modules\dmd\helpers\link-to.js:33:29)
at Object.eval (eval at <anonymous> (C:\Users\Shrike\AppData\Roaming\npm\node_modules\jsdoc-to-markdown\node_modules\dmd\node_modules\boil-js\node_modules\handlebars\dist\cjs\handlebars\compiler\javascript-compiler.js:181:23), <anonymous>:10:90)
at ret (C:\Users\Shrike\AppData\Roaming\npm\node_modules\jsdoc-to-markdown\node_modules\dmd\node_modules\boil-js\node_modules\handlebars\dist\cjs\handlebars\runtime.js:106:30)
at ret [as param] (C:\Users\Shrike\AppData\Roaming\npm\node_modules\jsdoc-to-markdown\node_modules\dmd\node_modules\boil-js\node_modules\handlebars\dist\cjs\handlebars\compiler\compiler.js:459:21)
at Object.invokePartialWrapper [as invokePartial] (C:\Users\Shrike\AppData\Roaming\npm\node_modules\jsdoc-to-markdown\node_modules\dmd\node_modules\boil-js\node_modules\handlebars\dist\cjs\handlebars\runtime.js:48:28)
at Object.eval (eval at <anonymous> (C:\Users\Shrike\AppData\Roaming\npm\node_modules\jsdoc-to-markdown\node_modules\dmd\node_modules\boil-js\node_modules\handlebars\dist\cjs\handlebars\compiler\javascript-compiler.js:181:23), <anonymous>:3:17)
at prog (C:\Users\Shrike\AppData\Roaming\npm\node_modules\jsdoc-to-markdown\node_modules\dmd\node_modules\boil-js\node_modules\handlebars\dist\cjs\handlebars\runtime.js:148:15)
at Object.<anonymous> (C:\Users\Shrike\AppData\Roaming\npm\node_modules\jsdoc-to-markdown\node_modules\dmd\node_modules\boil-js\node_modules\handlebars\dist\cjs\handlebars\base.js:133:23)
jsdoc3 (3.3.0-alpha) parses this file successfully. I can send you the json parsed by jsdoc3
yes, this helps thanks.. the code is failing within a PR i recently accepted.. in order to reproduce this myself i need the source code, could you send the section from core.lang.js
which is causing the issue? It doesn't need to be the whole file, but sending the whole file is fine too.. you can send me the link to a private gist if you want to keep it offline.
Here's what causes the error:
if remove * @param originalViewModel
then error dissappears.
lang.ViewModelExtender = lang.Class(/** @lends ViewModelExtender.prototype */ {
/**
* @class ViewModelExtender
* @param originalViewModel
*/
constructor: function (originalViewModel) {
this.viewModel = lang.proxy(originalViewModel);
this.eventBinder = new lang.EventBinder(this);
},
declareProp: function (name, initial, onChange) {
this.viewModel.declareProp(name, initial);
if (onChange)
this.eventBinder.bind(this.viewModel, "change:" + name, onChange.bind(this.viewModel));
},
dispose: function() {
this.eventBinder.unbind();
}
});
btw, i forgot to mention - running jsdoc2md with --verbose
gives you a full error stack..
looking into the issue
fixed in https://github.com/75lb/dmd/commit/b3c354730055d5ceaa4b694f95236fb58abb7eee.
Please run either npm update -g jsdoc-to-markdown
(global install) or npm update
(local install) to pick up the new version of dmd
..
If it fixes the issue, please let me know and close this issue :)
yeah, it works, thanks.
i also pushed a fix to jsdoc2md
so a broken operation outputs:
$ jsdoc2md broken.js
Error: Parameter 'url' must be a string, not undefined
(run jsdoc2md with --verbose for a stack trace)
pleased it works, thanks for the contribution :+1:
Running jsdoc2md againt a bunch of js files and getting weird error.
Something is wrong but what and where?