mike-lischke / antlr4-c3

A grammar agnostic code completion engine for ANTLR4 based parsers
MIT License
397 stars 62 forks source link

TypeError: Class extends value undefined is not a constructor or null when import CodeCompletionCore #70

Closed chengchengpei closed 1 year ago

chengchengpei commented 1 year ago
  ● Test suite failed to run

    TypeError: Class extends value undefined is not a constructor or null

      3 | import { PrestoSqlParser } from '../libts/presto/PrestoSqlParser';
      4 | import { CustomErrorStrategy } from './CustomErrorStrategy';
    > 5 | import { CodeCompletionCore } from 'antlr4-c3';
        | ^
      6 | import {
      7 |   ANTLRErrorListener,
      8 |   ANTLRErrorStrategy,

      at Object.<anonymous> (../../../../../../.yarn/cache/antlr4ts-npm-0.5.0-dev-7e0fc8988a-640dae2229.zip/node_modules/src/tree/xpath/XPathLexer.ts:18:33)
      at Object.<anonymous> (../../../../../../.yarn/cache/antlr4ts-npm-0.5.0-dev-7e0fc8988a-640dae2229.zip/node_modules/src/tree/xpath/XPath.ts:16:1)
      at Object.<anonymous> (../../../../../../.yarn/cache/antlr4ts-npm-0.5.0-dev-7e0fc8988a-640dae2229.zip/node_modules/src/tree/xpath/index.ts:6:1)
      at Object.<anonymous> (../../../../../../.yarn/cache/antlr4ts-npm-0.5.0-dev-7e0fc8988a-640dae2229.zip/node_modules/src/tree/index.ts:18:1)
      at Object.<anonymous> (../../../../../../.yarn/cache/antlr4ts-npm-0.5.0-dev-7e0fc8988a-640dae2229.zip/node_modules/src/index.ts:9:1)
      at Object.<anonymous> (../../../../../../.yarn/cache/antlr4-c3-npm-2.2.1-db3ae1db96-8dd44825f3.zip/node_modules/antlr4-c3/src/CodeCompletionCore.ts:10:1)
      at Object.<anonymous> (../../../../../../.yarn/cache/antlr4-c3-npm-2.2.1-db3ae1db96-8dd44825f3.zip/node_modules/antlr4-c3/index.ts:8:1)
      at Object.<anonymous> (src/autocomplete/presto.ts:5:1)
      at Object.<anonymous> (__tests__/autocomplete/presto/suggest.test.ts:1:1)

Any idea why? thanks

mike-lischke commented 1 year ago

https://stackoverflow.com/questions/74793164/class-extends-value-undefined-is-not-a-constructor-or-null-when-import-corecom/74794864#74794864