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

Open
ChrisPearce opened this Issue Mar 2, 2017 · 7 comments

Comments

Projects
None yet
7 participants
@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

This comment has been minimized.

borysn commented Apr 29, 2017

I'm confused about the status of this

@borysn

This comment has been minimized.

borysn commented Apr 29, 2017

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

@dmdm

This comment has been minimized.

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

This comment has been minimized.

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

This comment has been minimized.

dkent600 commented Feb 3, 2018

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

@dkent600

This comment has been minimized.

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

This comment has been minimized.

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment