Closed omerson-cruz closed 1 year ago
Hey, there doesn't seem to be any suspicious in the shared part of the log. Looks like the tools has patched all found files, that include next.js files. However the log doesn't include any activity on the patched files (looks like your next.js app is not running). Have you started/restarted next.js CLI (via running npm run dev
/next dev
)?
Hi @ArtemGovorov, Thanks for your quick response. Yes I was already running the next.js app when I checked the Console-ninja logs. Also I tried restarting the Console-ninja but still cannot receive the logs .
And to give more information about the issue here's what my current setup and how I work on VS Code
Give are the following:
My VS Code is open on the root of my Monorepo.
My Monorepo Setup
Hello @ArtemGovorov ,
To give an update on my issue I was able to make it work by opening the Next.js app itself on a separate VS code instance or an separated workspace. As you can see on the SS below.
In the exmple above the Button From Components has console log that I wanted to see on Console-Ninja. And it works during the rendering process. (Even if the console log is coming from a different workspace in VS code)
But the console.log() on an even handler does not work and there is this websocket error that appearead
@ArtemGovorov I've updated to the latest version as of the moment which is v.0.0.24 and still having that logger websocket error when I console.log() on an event handler (again, this code file is from another monorepo package outside of the opened workspace)
My VS Code is open on the root of my Monorepo.
This scenario should be supported: https://github.com/wallabyjs/console-ninja/issues/36#issuecomment-1345455464, however opening an individual package in VS Code is not supported at the moment.
We have fixed some monorepo scenarios in the next release (v0.0.29+), please try it and let us know how it goes.
@ArtemGovorov ,
I have updated to v.0.0.30 and Monorepo seems working now but with some issues. (My VS Code editor is opened on the root of my monorepo) I retested again with Next.js app in the monorepo with
All console.log works during initial load or render. But there appeared a "logger websocket error" as seen on the screenshot below
Also another issue is that console log for event handlers like the onClick for the LocalButton and the Button from another monorepo package is not showing on the VS code editor. And the websocket error appeared after clicking the Buttons
Hi @ArtemGovorov , I just tested this issue on the latest Console Ninja v.0.0.43 and it's now working. Thank you guys for your hardwork 💯 💯 💯
I think you can close this ticket now. :)
Awesome, thanks for the update!
Thanks for the quick fix too :)
Hi Wallaby team,
When trying to console.log() in Next.js app, which under a Monorepo setup using Lerna. the console-ninja does not work and shows the below error on the trace log. I'm not sure if the issue is related to the error show below but if I'm not mistaken the Monorepo is still not supported by Console-ninja?