oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
72.99k stars 2.66k forks source link

vue-tsc: ReferenceError: sys is not defined #11923

Closed FjellOverflow closed 1 month ago

FjellOverflow commented 2 months ago

What version of Bun is running?

1.1.12+43f0913c3

What platform is your computer?

Linux 6.8.11-300.fc40.x86_64 x86_64 unknown

What steps can reproduce the bug?

Create Vue & TS project

bun create vite
✔ Select a framework: › Vue
✔ Select a variant: › TypeScript

Install & build (runs vue-tsc)

bun install
bun run build

What is the expected behavior?

Runs vue-tsc with no errors.

What do you see instead?

ReferenceError: sys is not defined
    at eval (eval at get (/home/FjellOverflow/Projects/vite-project/node_modules/typescript/lib/tsc.js:552:209), <anonymous>:1:1)
    at Object.get (/home/FjellOverflow/Projects/vite-project/node_modules/typescript/lib/tsc.js:552:209)
    at Object.proxyCreateProgram (/home/FjellOverflow/Projects/vite-project/node_modules/@volar/typescript/lib/node/proxyCreateProgram.js:33:64)
    at /home/FjellOverflow/Projects/vite-project/node_modules/typescript/lib/tsc.js:552:138
    at /home/FjellOverflow/Projects/vite-project/node_modules/typescript/lib/tsc.js:606:7
    at Object.<anonymous> (/home/FjellOverflow/Projects/vite-project/node_modules/typescript/lib/tsc.js:627:3)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)

Additional information

No response

ferm10n commented 1 month ago

I'm getting this without using bun after updating vue-tsc to 2.0.26 Why do you think this is a bun issue?

UPDATE: vue-tsc has peer dependency typescript@>=5, make sure your typescript version satisfies this. Mine didn't and after I upgraded the error went away

FjellOverflow commented 1 month ago

While I'm fairly sure this error occurred with latest (or at least >= 5) typescript, it seems fixed now, I can not reproduce it anymore. Closing issue for now.