-
-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add logging to watch function for easier troubleshooting #218
Comments
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
I was also having issues with endless restarts of Every time Next.js compiled the pages (which happens automatically when you visit them in a browser) it would restart
I was thinking that I would need to ignore the
Haven't had a chance to dig in deeper yet, but will post back here if I have more details later. |
@privatenumber Nice, thanks for #412! I'll test it with my failure case when it's released (potentially in |
Ok, looking at the logs with
I'll try to find a way to ignore these files. |
Ok, I think I found a way to ignore the files, but this configuration unfortunately also causes $ pwd
~/p/project/packages/server
$ pnpm tsx watch --clear-screen=false --ignore ./../website/.next/**/* index.ts
...
node:internal/process/esm_loader:40
internalBinding('errors').triggerUncaughtException(
^
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '~/p/project/packages/website/.next/cache/webpack' imported from ~/p/project/packages/server/ I only want to ignore these files from watch mode, not exclude them from the build entirely... 🤔 |
If it's not my error but rather a bug, happy to open a new issue with a more structured bug report. 👍 |
Sounds like unexpected behavior that was surfaced as a result of this feature. Regarding your second log: are you saying adding the Since this isn't actually relevant to this Issue topic, would you mind filing a bug? |
Sounds good, opened an issue with the bug report and sandbox here: |
Feature request
It would be helpful to have more detailed logging when using the watch function in TSX. Specifically, it would be beneficial to log the specific event and path that caused a change, making it easier to troubleshoot issues. This would greatly reduce the time and effort required to identify and resolve problems.
Why?
While working with TSX in conjunction with Vite SSR, I have encountered an issue where Vite generates intermediate files during startup, causing unnecessary reruns that have caused me to spend a significant amount of time troubleshooting. Despite attempts to add logging to the TSX rerun function, I have found that the log function returns "undefined". I eventually discovered that the
debounce
process was discarding all parameters, leading to this issue.This issue has caused significant disruptions to my workflow, as it has made it difficult to identify and resolve issues efficiently. It would be beneficial to provide a solution for this problem, such as modifying the debounce process or providing a workaround for the logging issue.
Alternatives
Additional context
No response
The text was updated successfully, but these errors were encountered: