Skip to content

0.14.1 does not find typedoc.js in monorepo setup #945

@webmaster128

Description

@webmaster128

Expected Behavior

Upgrading from 0.13.x to 0.14.1 works without changing command line arguments.

Actual Behavior

I get the following error when invoking using 0.14.1:

$ shx rm -rf docs && typedoc --options typedoc.js
internal/modules/cjs/loader.js:605
    throw err;
    ^

Error: Cannot find module 'typedoc.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:603:15)
    at Function.Module._load (internal/modules/cjs/loader.js:529:25)
    at Module.require (internal/modules/cjs/loader.js:657:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at TypedocReader.load (/project/node_modules/typedoc/dist/lib/utils/options/readers/typedoc.js:53:20)
    at TypedocReader.onDiscover (/project/node_modules/typedoc/dist/lib/utils/options/readers/typedoc.js:39:22)
    at triggerApi (/project/node_modules/typedoc/dist/lib/utils/events.js:259:33)
    at triggerApi (/project/node_modules/typedoc/dist/lib/utils/events.js:110:13)
    at Options.trigger (/project/node_modules/typedoc/dist/lib/utils/events.js:252:13)
    at Options.read (/project/node_modules/typedoc/dist/lib/utils/options/options.js:51:14)

To work around this issue, I can use typedoc --options ./typedoc.js, which leads to the expected result.

This issue may occur because I'm in a lerna monorepo setup (see project below)

Steps to reproduce the bug

  1. Clone https://github.com/iov-one/iov-core
  2. git checkout 000f559074ebfb3fc132406f3f5c34b34e5b09f3
  3. Upgrade typescript to 3.2 and typedoc to 0.14.1 in the root package.json
  4. yarn install
  5. yarn docs

Environment

  • Typedoc version: 0.14.1
  • Node.js version: 11
  • OS: macOS

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