oven-sh / bun

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

gulp not running due to node:Console #4737

Closed noraj closed 1 year ago

noraj commented 1 year ago

What version of Bun is running?

1.0.0+822a00c4d508b54f650933a73ca5f4a3af9a7983

What platform is your computer?

Linux 6.4.12-arch1-1 x86_64 unknown

What steps can reproduce the bug?

What is the expected behavior?

gulp running like it would on nodejs

What do you see instead?

➜ bun run gulp
15 | 
16 | // Needed to add this because node 10 decided to start coloring log output randomly
17 | var console;
18 | if (nodeVersion.major >= 10) {
19 |   // Node 10 also changed the way this is constructed
20 |   console = new Console({
                ^
TypeError: undefined is not a constructor (evaluating 'new Console({
      stdout: process.stdout,
      stderr: process.stderr,
      colorMode: !1
    })')
      at /home/noraj/Dev/rawsec-cybersecurity-inventory/node_modules/fancy-log/index.js:20:12
      at globalThis (/home/noraj/Dev/rawsec-cybersecurity-inventory/node_modules/fancy-log/index.js:92:23)
      at require (:1:20)
      at /home/noraj/Dev/rawsec-cybersecurity-inventory/node_modules/gulp-cli/lib/shared/log/to-console.js:3:4
      at globalThis (/home/noraj/Dev/rawsec-cybersecurity-inventory/node_modules/gulp-cli/lib/shared/log/to-console.js:58:17)
      at require (:1:20)
      at /home/noraj/Dev/rawsec-cybersecurity-inventory/node_modules/gulp-cli/index.js:20:4
      at globalThis (/home/noraj/Dev/rawsec-cybersecurity-inventory/node_modules/gulp-cli/index.js:111:17)

Additional information

Ref. https://bun.sh/docs/runtime/nodejs-apis

If you run into any bugs with a particular package, please open an issue. Opening issues for compatibility bugs helps us prioritize what to work on next.

Seems due at least to node:console incomplete support.

Asking for bun support on upstream https://github.com/gulpjs/gulp/issues/2737

brianblakely commented 1 year ago

This issue also blocks compatibility with patch-console (relevant source code), which is used by packages like Ink.

rvbuelow commented 1 year ago

Seems to be this issue https://github.com/oven-sh/bun/issues/3625