DerekStride / tree-sitter-sql

SQL grammar for tree-sitter
http://derek.stride.host/tree-sitter-sql/
MIT License
147 stars 47 forks source link

Cannot run in a macOS environment #254

Open iamchanii opened 4 months ago

iamchanii commented 4 months ago

Hello! I tried to use this, but cannot run in my machine. Here is some context:

Environment

Reproduce

  1. Clone https://github.com/iamchanii/tree-sitter-derekstride-sql-reproduce and install dependencies. (I used to install it with pnpm, but I think you can do it with npm)
  2. Run node index.js

Exception

Just executed and exit with code 0.

Actual Result

node:internal/modules/cjs/loader:1473
  return process.dlopen(module, path.toNamespacedPath(filename));
                 ^

Error: dlopen(/Users/.../tree-sitter-derekstride-sql-reproduce/node_modules/.pnpm/@derekstride+tree-sitter-sql@0.3.0/node_modules/@derekstride/tree-sitter-sql/build/Release/tree_sitter_sql_binding.node, 0x0001): symbol not found in flat namespace '_tree_sitter_sql_external_scanner_create'
    at Module._extensions..node (node:internal/modules/cjs/loader:1473:18)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Module._load (node:internal/modules/cjs/loader:1023:12)
    at Module.require (node:internal/modules/cjs/loader:1235:19)
    at require (node:internal/modules/helpers:176:18)
    at load (/Users/.../tree-sitter-derekstride-sql-reproduce/node_modules/.pnpm/node-gyp-build@4.8.0/node_modules/node-gyp-build/node-gyp-build.js:22:10)
    at Object.<anonymous> (/Users/.../tree-sitter-derekstride-sql-reproduce/node_modules/.pnpm/@derekstride+tree-sitter-sql@0.3.0/node_modules/@derekstride/tree-sitter-sql/bindings/node/index.js:3:43)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Module.load (node:internal/modules/cjs/loader:1207:32) {
  code: 'ERR_DLOPEN_FAILED'
}