Error handling upgrade request TypeError: Cannot read properties of undefined (reading 'bind')
Unanswered
Gray Wagtail posted this in #help-forum
Gray WagtailOP
We have a monorepo with app and pages router apps, and in only one of them (app router one) do we see this error in the server terminal. Doesn't seem to actually affect anything (or so we hope), but what does this indicate? I can't find anything on this.
4 Replies
Gray WagtailOP
Full message (some was cut off in the title)
Error handling upgrade request TypeError: Cannot read properties of undefined (reading 'bind')
at DevServer.handleRequestImpl (/home/philip/projects/mono/node_modules/next/dist/server/base-server.js:460:50)It does also so happen that this app's HMR websocket does not work, could that be related? It never worked before either
It works in the other apps, and this one's proxy is a bit different, could be related
Gray WagtailOP
This app has a custom assetPrefix, thinking that could be a cause also
const assetPrefix = '/ency-junior-assets';
/**
* @type {import('@nx/next/plugins/with-nx').WithNxOptions}
**/
const nextConfig = {
experimental: { instrumentationHook: true },
assetPrefix,
webpack(config, options) {
config.module.rules.push({
test: /\.gql/,
use: [options.defaultLoaders.babel, { loader: '@bustle/graphql-loader' }],
});
return config;
},
nx: { svgr: true },
images: {
dangerouslyAllowSVG: true,
domains: ['dam.ne.se', 'assets-cdn.brockhaus.de', 'assets-cdn.ne.se'],
path: `${assetPrefix}/_next/image`,
},
};