Skip to content

Error: Unexpected end of input #92

@robtarr

Description

@robtarr

I have a project that i Just started a couple of months ago, and set up jsdox. I just made some changes, and recently upgraded to Node 4.3.1 (not sure if that is causing the problem). But when I try to run jsdox now, I get:

Error generating docs for file featurama-client.js [SyntaxError: Unexpected end of input]
[SyntaxError: Unexpected end of input]
/Users/Rob/projects/featurama/node_modules/jsdox/jsdox.js:300
            throw err;
            ^

SyntaxError: Unexpected end of input
    at Object.parse (native)
    at jsdocParser._onComplete (/Users/Rob/projects/featurama/node_modules/jsdox/node_modules/jsdoc3-parser/index.js:37:19)
    at ChildProcess.exithandler (child_process.js:204:7)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at maybeClose (internal/child_process.js:821:16)
    at Socket.<anonymous> (internal/child_process.js:319:11)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)
    at Pipe._onclose (net.js:469:12)

This is the file I'm running it on is this:

module.exports = function() {
  var list = {};

  /**
   *  Enable the indicated feature
   *
   *  @param    {String} featureName
   */
  function on(featureName) {
    list[featureName] = true;
  }

  /**
   *  Disable the indicated feature
   *
   *  @param    {String} featureName
   */
  function off(featureName) {
    list[featureName] = false;
  }

  /**
   *  Return the on/off status of the indicated feature
   *
   *  @param    {String} featureName
   */
  function enabled(featureName) {
    return list[featureName];
  }

  return {
    init: _buildList,
    on: on,
    off: off,
    enabled: enabled
  };
}();

It seems like deleting any line of code from this snippet (I've already ripped out some) fixes the problem. This, however, is not a very good solution. :)

I've traced it back to line 17 of jsdoc3-parser, and I've tried to play with the maxBuffer size, but have not had any luck.
execFile(cmd, ['-X', filename], { maxBuffer: 5120 * 1024 }, jsdocParser._onComplete.bind(null, cb));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions