We are using JsDoc to create our document of reactjs pages. All comment we wrote as per the jsDoc rule but still it showing below message for some page:
ERROR: Unable to parse D:\Example\src\reducers\example.js:Unexpected token
I am not getting the error in other pages, we wrote the comment same way but for some pages it is throwing above error. How can I get the exact error message and line number where it is failing?
How can I get the exact error message and line number where it is failing?
Command-line arguments to JSDoc provide --verbose
option which should provide with log detailed information as JSDoc runs. Unfortunately this will not give you exact line number.
What you ask is available as the open request on GitHub: Option to print error stack. As you may guess this is not implemented yet. You may use work around, which posted by iPherian in the same thread. This work around will give you line number and column of the error occur.
EDIT:
As of jsdoc version "3.5.0-dev" (current development master) the feature to print line and column number of error occur is implemented and available. After installation of the current development version ...
npm install git+https://github.com/jsdoc3/jsdoc.git
and running jsdoc against JS source
>"C:\folder\node_modules\.bin\jsdoc.cmd" AppScripts -d bin/Reference --verbose
the error along with line and column numbers are printed out into the output ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With