Skip to content

"Error: Expected a symbol for node with kind StringLiteral" #1322

@acao

Description

@acao

Search terms

Error: Expected a symbol for node with kind

Expected Behavior

previously, typedoc worked great with our monorepo in the main branch.

we expect it to compile correctly

note: the actual typescript compilation is working fine. all the project references compile correctly.

Actual Behavior

when we merged a feature branch that uses export * from './module-path, typedoc is having a parser error on that file.

 Mapping  /graphiql/packages/graphiql/src/api/index.ts  ==>  graphiql
/graphiql/node_modules/typedoc/dist/lib/converter/context.js:55
            throw new Error(`Expected a symbol for node with kind ${ts.SyntaxKind[node.kind]}`);
            ^

Error: Expected a symbol for node with kind StringLiteral
    at Context.expectSymbolAtLocation (/home/rikki/projects/graphiql/node_modules/typedoc/dist/lib/converter/context.js:55:19)

the file in question looks like this:

export * from './providers/GraphiQLEditorsProvider';
export * from './providers/GraphiQLSessionProvider';
export * from './providers/GraphiQLSchemaProvider';
export * from './hooks';
export * from './types';

this occurs with or without third party plugins, such as typedoc-monorepo-plugin which we were using successfully before this PR merge.

Steps to reproduce the bug

I cannot seem to reproduce the bug in a simplified, non-monorepo context:
https://github.com/acao/typedoc-export-bug-example

export * from 'module-path' seems to work fine with tsdoc in this case.

but in https://github.com/graphql/graphiql/ that is not the case

steps:

  1. clone https://github.com/graphql/graphiql/
  2. yarn
  3. yarn build
  4. yarn build-docs

Environment

  • Typedoc version: 0.17.7
  • TypeScript version: 3.9.5
  • Node.js version: 13
  • OS: linux, alpine

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