Towerism / trino-sql-parser

Trino SQL parser for javascript built with antlr4
0 stars 0 forks source link

Fails to run on Node 21.4 (or indeed, other Node versions) #2

Open dthompson-maystreet opened 10 months ago

dthompson-maystreet commented 10 months ago
import {parse} from "trino-sql-parser";

debugger;
const $36bcc2776d05c710$var$sharedContextCache = new (0, $8gIH8$antlr4).PredictionContextCache();
                                                 ^

TypeError: (0 , $8gIH8$antlr4).PredictionContextCache is not a constructor
    at file:///Users/Dave/XXX/node_modules/trino-sql-parser/dist/main.mjs:28677:50
    at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
    at async loadESM (node:internal/process/esm_loader:28:7)
    at async handleMainPromise (node:internal/modules/run_main:113:12)

Node.js v21.4.0