-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
fix: next trace error #18189
fix: next trace error #18189
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason I still have the following traceChild error
[webpack-dev-middleware] TypeError: Cannot read property 'traceChild' of undefined
at /Users/bart/Documents/exp/next-wp-5-cy/node_modules/next/dist/build/webpack/plugins/profiling-plugin.js:31:45
at Hook.eval [as callAsync] (eval at create (/Users/bart/Documents/exp/next-wp-5-cy/node_modules/next/dist/compiled/webpack/bundle5.js:33832:10), <anonymous>:9:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/bart/Documents/exp/next-wp-5-cy/node_modules/next/dist/compiled/webpack/bundle5.js:33634:14)
at Compiler.compile (/Users/bart/Documents/exp/next-wp-5-cy/node_modules/next/dist/compiled/webpack/bundle5.js:48339:28)
at /Users/bart/Documents/exp/next-wp-5-cy/node_modules/next/dist/compiled/webpack/bundle5.js:75800:19
at Hook.eval [as callAsync] (eval at create (/Users/bart/Documents/exp/next-wp-5-cy/node_modules/next/dist/compiled/webpack/bundle5.js:33832:10), <anonymous>:15:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/bart/Documents/exp/next-wp-5-cy/node_modules/next/dist/compiled/webpack/bundle5.js:33634:14)
at run (/Users/bart/Documents/exp/next-wp-5-cy/node_modules/next/dist/compiled/webpack/bundle5.js:75754:33)
at /Users/bart/Documents/exp/next-wp-5-cy/node_modules/next/dist/compiled/webpack/bundle5.js:75749:6
at Compiler.readRecords (/Users/bart/Documents/exp/next-wp-5-cy/node_modules/next/dist/compiled/webpack/bundle5.js:48176:11)
at run (/Users/bart/Documents/exp/next-wp-5-cy/node_modules/next/dist/compiled/webpack/bundle5.js:75745:26)
at Watching._go (/Users/bart/Documents/exp/next-wp-5-cy/node_modules/next/dist/compiled/webpack/bundle5.js:75804:3)
at Watching._invalidate (/Users/bart/Documents/exp/next-wp-5-cy/node_modules/next/dist/compiled/webpack/bundle5.js:75981:9)
at /Users/bart/Documents/exp/next-wp-5-cy/node_modules/next/dist/compiled/webpack/bundle5.js:75667:28
at processTicksAndRejections (internal/process/task_queues.js:75:11)
Here is the repo I use https://github.com/elevatebart/next-wp-5-cy
@elevatebart I checked out your repo and didn't see the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ZachJW34 I swear I saw it fail.
It worked, sorry fo the weirdness I guessed I missed a file to copy.
I tried following the instructions here and in the original issue but I can't reproduce the problem. Looks like @elevatebart did though. Are we good to merge? Edit: I reproduced by changing some versions of dependencies, but I cannot get past the trace error. Maybe I'm doing something wrong. If we are confident this is fix is fine, happy to move forward. |
This fixed worked for me, it is not introducing regressions LGTM |
This reverts commit db6f909.
User facing changelog
Fix webpack error with next >= 11.1.1
Additional details
Next introduced tracing in v11.1.1. The trace is a required option for
getNextJsBaseWebpackConfig
, so this PR adds that. If trace doesn't exist, it's a no-op.How to test
I tested this by creating a branch inside
cypress-component-testing-examples
(the deps are slightly out of date so I updated most of them, pluscreate-next-app
doesn't use Webpack 4 so I forced it). You can run:You can repeat the above inside of
create-next-app
which will test Webpack 4. Also, you can change the Next version to11.1.0
and verify that this change isn't breaking previous versions.How has the user experience changed?
Next with Webpack 5 and Next >= 11.1.1 works
PR Tasks
NA