Skip to content

--options broken #223

@PhilippSoehnlein

Description

@PhilippSoehnlein

It looks like v0.4 broke the --options option.

The error message is:

module.js:341
throw err;
^

Error: Cannot find module 'config.js'
at Function.Module._resolveFilename (module.js:339:15)
at Function.Module._load (module.js:290:25)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at TypedocReader.load (/Users/phil/tmp/typedoctest/node_modules/typedoc/lib/utils/options/readers/typedoc.js:43:20)
at TypedocReader.onDiscover (/Users/phil/tmp/typedoctest/node_modules/typedoc/lib/utils/options/readers/typedoc.js:29:18)
at /Users/phil/tmp/typedoctest/node_modules/typedoc/lib/utils/events.js:256:33
at triggerApi (/Users/phil/tmp/typedoctest/node_modules/typedoc/lib/utils/events.js:106:13)
at Options.EventDispatcher.trigger (/Users/phil/tmp/typedoctest/node_modules/typedoc/lib/utils/events.js:250:13)
at Options.read (/Users/phil/tmp/typedoctest/node_modules/typedoc/lib/utils/options/options.js:72:14)

Steps to reproduce:

  • mkdir -p typedoctest/src
  • cd typedoctest
  • touch src/test.ts
  • npm install typedoc
  • echo "module.exports = { out: 'docs' }" > config.js
  • node_modules/.bin/typedoc --options config.js src

When you look into typedoc/lib/utils/options/readers/typedoc.js:43 you see, that the file can be found, but not required. Manually requiring the file in a REPL works (node -e "console.log( require('./config.js') );").

The same test works with version 0.3.12. I'm using Mac OS 10.11.4 and tried node 5.9.1 and 6.2.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions