esdoc / esdoc

ESDoc - Good Documentation for JavaScript
https://esdoc.org
MIT License
2.74k stars 205 forks source link

esdoc fails to parse js #414

Open eawer opened 7 years ago

eawer commented 7 years ago

Make sure these boxes are checked before submitting your issue - thank you! (If your issue is neither a both bug nor a request, please write in a free style)

Short summary of your issue

I have only one file containing only one line of code (provided below). For some reason it breaks esdoc

Input data for reproducing

Configuration

{
  "source": "./lib/",
  "destination": "./doc",
  "includes": ["\\.(js)$"],
  "lint": true,
  "experimentalProposal": {
    "classProperties": true,
    "objectRestSpread": true,
    "decorators": true,
    "doExpressions": true,
    "functionBind": true,
    "asyncGenerators": true,
    "exportExtensions": true,
    "dynamicImport": true
  }
}

Codes

module.exports['test.init'] = function init(context) {};

Output data

Log

> esdoc -c .esdoc.json

parse: lib/index.js
resolve: extends chain
resolve: necessary
resolve: access

Exception output (if possible)

Log


TypeError: Cannot read property 'charAt' of undefined
    at Object.<anonymous> (node_modules/esdoc/out/src/Publisher/Builder/DocResolver.js:96:37)
    at node_modules/taffydb/taffy.js:743:17
    at each (node_modules/taffydb/taffy.js:126:17)
    at Object.<anonymous> (node_modules/taffydb/taffy.js:740:7)
    at Object.API.(anonymous function) [as update] (node_modules/taffydb/taffy.js:166:18)
    at DocResolver._resolveAccess (node_modules/esdoc/out/src/Publisher/Builder/DocResolver.js:94:18)
    at DocResolver.resolve (node_modules/esdoc/out/src/Publisher/Builder/DocResolver.js:35:10)
    at CoverageBuilder.DocBuilder (node_modules/esdoc/out/src/Publisher/Builder/DocBuilder.js:47:37)
    at CoverageBuilder (node_modules/esdoc/out/src/Publisher/Builder/CoverageBuilder.js:16:1)
    at publish (node_modules/esdoc/out/src/Publisher/publish.js:142:5)

npm ERR! Linux 4.4.0-72-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "docs"
npm ERR! node v7.7.1
npm ERR! npm  v4.1.2
npm ERR! code ELIFECYCLE
npm ERR! p@1.0.0 docs: `esdoc -c .esdoc.json`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the p@1.0.0 docs script 'esdoc -c .esdoc.json'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the p package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     esdoc -c .esdoc.json
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs p
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls p
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     npm-debug.log

Screen shot of documentation

// attach a image into here

Your environment

jorisknulst commented 6 years ago

Have you found an answer yet? I have the same problem