NextJS Issues
Module not found: Can't resolve 'encoding'
If you ever see console warning like the following related to encoding, lokijs and pino-pretty:
./node_modules/node-fetch/lib/index.js
Module not found: Can't resolve 'encoding' in '/Users/xxx/xxx/node_modules/node-fetch/lib'
You can fix it by adding the following to your next.config.js
:
webpack: (config) => {
config.externals.push("pino-pretty", "lokijs", "encoding");
return config;
};
It would appear that itโs coming from the following issue: https://github.com/WalletConnect/walletconnect-monorepo/issues/1908#issuecomment-1487801131
Was this page helpful?