Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Option 'sourceRoot can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided #438

Closed
ChrisPearce opened this issue Mar 2, 2017 · 7 comments
Labels

Comments

@ChrisPearce
Copy link

@ChrisPearce ChrisPearce commented Mar 2, 2017

TypeDoc is displaying the following error:
Error: Option 'sourceRoot can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided.

The CLI command I'm using to execute TypeDoc is
typedoc --out ./typedoc-output ./

My TypeScript project contains a tsconfig.json file in the root of the project containing the following:
{
"compilerOptions": {
"target": "es2015",
"module": "commonjs",
"sourceMap": true,
"declaration": true,
"strictNullChecks": true,
"sourceRoot": "./"
},

@borysn
Copy link

@borysn borysn commented Apr 29, 2017

I'm confused about the status of this

@borysn
Copy link

@borysn borysn commented Apr 29, 2017

also, is typedoc just broken? how do i get around this?

@dmdm
Copy link

@dmdm dmdm commented Apr 30, 2017

As a workaround I have added 'sourceMap: true"

        this.compilerOptions = {
            target: ts.ScriptTarget.ES3,
            module: ts.ModuleKind.None,
            sourceMap: true,
        };

in file node_modules/typedoc/dist/lib/utils/options/options.js

@aciccarello aciccarello added the bug label May 1, 2017
@dolanmiu
Copy link

@dolanmiu dolanmiu commented Dec 29, 2017

What is the status of this bug?

I can reproduce this on 0.9.0 and can fix it with @dmdm's suggestion

But obviously this is not ideal

@dkent600
Copy link

@dkent600 dkent600 commented Feb 3, 2018

The workaround is not acceptable. The bug is happening to me too. Using TypeDoc version 0.10.0

@dkent600
Copy link

@dkent600 dkent600 commented Feb 28, 2018

I find that if I pass --ignoreCompilerErrors then it ignores this compiler error. But I'm not sure what other implications there might be, other than other compiler errors may be important not to ignore.

@FibreFoX
Copy link

@FibreFoX FibreFoX commented Jul 27, 2018

This bug still is present using TypeDoc 0.11.1 running on TypeScript 2.7.2 having this configuration inside my tsconfig.json:

{
  "compileOnSave": false,
  "compilerOptions": {
    "outDir": "dist",
    "module": "esnext",
    "target": "es5",
    "lib": ["es2017", "dom"],
    "sourceMap": true,
    "allowJs": true,
    "jsx": "react",
    "moduleResolution": "node",
    "forceConsistentCasingInFileNames": true,
    "noImplicitReturns": true,
    "noImplicitThis": true,
    "noImplicitAny": true,
    "strictNullChecks": true,
    "suppressImplicitAnyIndexErrors": true,
    "noUnusedLocals": true,
    "allowSyntheticDefaultImports": true,
    "sourceRoot": "src"
  },
  "exclude": [
    "node_modules",
    "build",
    "scripts",
    "acceptance-tests",
    "webpack",
    "jest",
    "src/setupTests.ts"
  ]
}

Executing with the --ignoreCompilerErrors argument (by just calling typedoc --out .\doc --ignoreCompilerErrors) created some output, but still prompted that warning-essage.

Is this bug anything important? Can this be ignored safely?

chriskrycho added a commit to true-myth/true-myth that referenced this issue Jan 11, 2019
Workaround for TypeStrong/typedoc#438.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
7 participants