console-ninja icon indicating copy to clipboard operation
console-ninja copied to clipboard

[Feature]: Enable Console Ninja for Turbo Repo.

Open hacking-impossible opened this issue 1 year ago • 3 comments

Describe the feature you'd like.

Hello, Console Ninja Developer Team! You are making great vscode extension what I ever used. I used this extension for Angular, Next.js, React, Node.js and TypeScript projects, and works awesome for these frameworks. I am trying to use Console Ninja for Turbo Repo, but seems like it doesn't support yet.

hacking-impossible avatar Jul 03 '24 14:07 hacking-impossible

Thank you for the kind words! We're glad you're enjoying Console Ninja!

Console Ninja does not currently support Turbopack, which is used by default by Turborepo. If you're interested in details, please see https://github.com/wallabyjs/console-ninja/issues/136. However, if you're happy to use Turborepo with Webpack instead of Turbopack, Console Ninja will work for you. To use Webpack instead of Turbopack, you'll need to remove the --turbo flags from the relevant scripts in your package.json file(s). Once removed, the warning messages saying Console Ninja will not work (seen during Turborepo startup) should no longer appear, and Ninja should work correctly.

mburnell avatar Jul 03 '24 22:07 mburnell

Hi, love console ninja but not supporting turbo pack is a big headache for us. I understand some of the issues but are there realistic plans for overcoming them anytime soon?

curately avatar Oct 26 '24 04:10 curately

Unfortunately, we don't have plans to support Turbopack in the near future.

Console Ninja operates by intercepting file reads at the Node.js fs level to instrument console.log calls, then passing the modified file content to your development server. Since Turbopack is built in Rust and handles its own file watching and reading, as well as serving files to the browser, our ability to intercept or modify those files is extremely limited - if possible at all.

To provide a seamless experience, Turbopack would need to provide an API or similar mechanism for intercepting or modifying the file reads it performs.

smcenlly avatar Oct 27 '24 22:10 smcenlly

Console Ninja now ships with built-in Turbopack support. Fire up a modern Next.js project (where npm run dev runs Turbopack by default) and Console Ninja will now seamlessly capture and map your runtime logs, errors and network calls just like it does with webpack builds.

ArtemGovorov avatar Oct 04 '25 03:10 ArtemGovorov

omg this is amazing !!! (sorry for posting but I love this) thanks @ArtemGovorov.

BTW will it work with TurboRepo, using vite etc?

GGAlanSmithee avatar Oct 07 '25 13:10 GGAlanSmithee