TypeError: config.watchOptions.ignored.filter is not a function or its return value is not iterable #77520
Labels
invalid link
The issue was auto-closed due to a missing/invalid reproduction link. A new issue should be opened.
Loading UI and Streaming
Related to loading UI (loading.tsx) and streaming.
Webpack
Related to Webpack with Next.js.
Link to the code that reproduces this issue
https://github.com/vercel/next.js/tree/canary/examples
To Reproduce
1. npm run dev
▲ Next.js 15.2.3
✓ Starting...
[TypeError: config.watchOptions.ignored.filter is not a function or its return value is not iterable]
2. npm run build
▲ Next.js 15.2.3
Linting and checking validity of types ... ⨯ ESLint: Cannot read properties of undefined (reading 'replace') Occurred while linting CWA\src@kernel\components\Chip\Chip.tsx:15 Rule: "@next/next/no-before-interactive-script-outside-document"
✓ Linting and checking validity of types
Creating an optimized production build ...
=================================================
This is
next.config.js
require("dotenv").config({ path:
./.env.${process.env.NODE_ENV}
});const path = require('path')
/** @type {import('next').NextConfig} */
const withTM = require('next-transpile-modules')([
//this triggers --> automatically enabled Fast Refresh for 1 custom loader
'@mui/material',
'@mui/system'
])
module.exports = withTM({
trailingSlash: true,
reactStrictMode: true,
output: 'standalone',
compiler: {
// Remove
console.*
output exceptconsole.error
removeConsole: {
exclude: ['error'],
},
// Uncomment this to suppress all logs.
// removeConsole: false,
},
env: {
ENVIRONMENT: process.env.ENVIRONMENT,
},
webpack: (config, { dev }) => {
config.resolve.alias = {
...config.resolve.alias
}
if (dev) {
config.watchOptions = {
poll: true,
}
return config
}
}
})
Current vs. Expected behavior
current: frontend is providing compilation error
expected: frontend local server should be working
Provide environment information
Which area(s) are affected? (Select all that apply)
Loading UI and Streaming, Webpack
Which stage(s) are affected? (Select all that apply)
next dev (local), next build (local), next start (local)
Additional context
This error is coming after I am trying to upgrade nextjs from 13 to 15.


I used this to upgrade -
npm i next@latest react@latest react-dom@latest eslint-config-next@latest
The text was updated successfully, but these errors were encountered: