While trying to following the instructions to debug the nextjs app using --inspect and chrome://inspect the debugger breaks at this exception. I tracked it to external handling in the webpack config for next-plugin-antd-less. Would you have any tips on how to move forward or workaround this?
/yeticlient/node_modules/next/dist/bin/next
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15)
at Function.mod._resolveFilename (/yeticlient/node_modules/next/dist/build/webpack/require-hook.js:4:1784)
at Function.resolve (internal/modules/cjs/helpers.js:78:19)
at /yeticlient/node_modules/next/dist/build/webpack-config.js:82:257
at new Promise ()
at /yeticlient/node_modules/next/dist/build/webpack-config.js:82:220
at handleExternals (/yeticlient/node_modules/next/dist/build/webpack-config.js:51:23)
at Array.webpackConfig.externals (/yeticlient/nodemodules/next/dist/build/webpack-config.js:82:149)
**at webpackConfig.externals (/yeticlient/node_modules/next-plugin-antd-less/overrideWebpackConfig.js:311:62)_**
at handleExternals (/yeticlient/node_modules/next/dist/compiled/webpack/bundle4.js:57292:17)
at next (/yeticlient/node_modules/next/dist/compiled/webpack/bundle4.js:57280:9)
at handleExternals (/yeticlient/node_modules/next/dist/compiled/webpack/bundle4.js:57285:7)
at /yeticlient/node_modules/next/dist/compiled/webpack/bundle4.js:57315:5
at /yeticlient/node_modules/next/dist/compiled/webpack/bundle4.js:64070:5
at AsyncSeriesWaterfallHook.eval [as callAsync] (eval at create (/yeticlient/node_modules/next/dist/compiled/webpack/bundle4.js:43435:10), :4:1)
at AsyncSeriesWaterfallHook.lazyCompileHook (/yeticlient/node_modules/next/dist/compiled/webpack/bundle4.js:43372:20)"
In package.json, use this script:
"debug": "NODE_OPTIONS='--inspect=0.0.0.0:9229' next dev",
Sorry about the complex description. However, this got resolved by updating to the latest nextjs "next": "^10.2.0". Will keep tracking to see if it recurs.
While trying to following the instructions to debug the nextjs app using --inspect and chrome://inspect the debugger breaks at this exception. I tracked it to external handling in the webpack config for next-plugin-antd-less. Would you have any tips on how to move forward or workaround this?
{ "code": "MODULE_NOT_FOUND", "requireStack": [ "/../node_modules/next/dist/build/webpack-config.js", "/../node_modules/next/dist/server/hot-reloader.js", "/../node_modules/next/dist/server/next-dev-server.js", "/../node_modules/next/dist/server/next.js", "/../node_modules/next/dist/server/lib/start-server.js", "/../node_modules/next/dist/cli/next-dev.js", "/../node_modules/next/dist/bin/next" ] }
Cannot find module 'next-plugin-loader?middleware=on-init-server!'
Error: Cannot find module 'next-plugin-loader?middleware=on-init-server!' "Error: Cannot find module 'next-plugin-loader?middleware=on-init-server!' Require stack:
In package.json, use this script: "debug": "NODE_OPTIONS='--inspect=0.0.0.0:9229' next dev",
Attach to the application with chrome://inspect
This is line 311 on the code;