microsoft / lsif-node

Define an index format for Language Servers
MIT License
172 stars 38 forks source link

TypeError: Optional options.transfer argument must be an iterable #190

Open connor4312 opened 4 months ago

connor4312 commented 4 months ago
  1. Clone https://github.com/websockets/ws
  2. Create a simple jsonconfig.json
{
  "compilerOptions": {
    "target": "ES2021"
  }
}
  1. Run npx -y lsif-tsc --out lsif.json --noContents --workspaceRoot ./ --package -p jsconfig.json
  2. See the error:
TypeError: Optional options.transfer argument must be an iterable
    at Worker.postMessage (node:internal/worker:371:5)
    at Connection._sendNotification (/home/connor/.npm/_npx/ee23f37870d9c921/node_modules/lsif-tsc/lib/common/connection.js:73:19)
    at FileWriter.writeBuffer (/home/connor/.npm/_npx/ee23f37870d9c921/node_modules/lsif-tsc/lib/common/writer.js:84:29)
    at FileWriter.writeln (/home/connor/.npm/_npx/ee23f37870d9c921/node_modules/lsif-tsc/lib/common/writer.js:66:18)
    at Object.emit (/home/connor/.npm/_npx/ee23f37870d9c921/node_modules/lsif-tsc/lib/emitters/line.js:8:20)
    at Object.emit (/home/connor/.npm/_npx/ee23f37870d9c921/node_modules/lsif-tsc/lib/main.js:613:21)
    at DataManager.emit (/home/connor/.npm/_npx/ee23f37870d9c921/node_modules/lsif-tsc/lib/lsif.js:2561:22)
    at DocumentData.emit (/home/connor/.npm/_npx/ee23f37870d9c921/node_modules/lsif-tsc/lib/lsif.js:157:23)
    at DocumentData.end (/home/connor/.npm/_npx/ee23f37870d9c921/node_modules/lsif-tsc/lib/lsif.js:292:18)
    at DataManager.documentProcessed (/home/connor/.npm/_npx/ee23f37870d9c921/node_modules/lsif-tsc/lib/lsif.js:2731:14) {
  code: 'ERR_INVALID_ARG_TYPE'
}