ESLint: Cannot serialize key "parse" in parser: Function values are not supported.
Unanswered
i_lost_to_loba_kreygasm posted this in #help-forum
⨯ ESLint: Cannot serialize key "parse" in parser: Function values are not supported.
Collecting page data ...
TypeError: Cannot read properties of undefined (reading 'startsWith')
at 87431 (.next/server/app/api/addComment/route.js:1:2038)
at t (.next/server/webpack-runtime.js:1:128)
at 91876 (.next/server/app/api/addComment/route.js:1:797)
at t (.next/server/webpack-runtime.js:1:128)
at r (.next/server/app/api/addComment/route.js:1:3011)
at <unknown> (.next/server/app/api/addComment/route.js:1:3038)
> Build error occurred
[Error: Failed to collect page data for /api/addComment] {
type: 'Error'
}
Error: Command "npm run build" exited with 1
can somebody please help me fix this error ?31 Replies
anyone ?
somebody please help me 😦
Thai
Did you find a solution? I am having the same issue
@Thai Did you find a solution? I am having the same issue
Are you on a monorepo?
Thai
yes
@Thai yes
which package manager are you using?
Thai
pnpm
do you have a
pnpm-workspace.yaml
Thai
yes
packages:
- "apps/*"
- "packages/*"
not very complicated
whats your next version?
Thai
15.1.7
I remember facing this issue in a monorepo.
Do you have a package-lock.json by any chance, incase you were using npm before pnpm
Do you have a package-lock.json by any chance, incase you were using npm before pnpm
Thai
nope
@Thai nope
and you have only 1 pnpm-lock in root of the project, right? Do you have any in
apps/web
or something?Thai
yep only one
I feel like pnpm has caused more issues than I would like, it is a mono repo that also has an expo app and I used it because of the expo app.
@Thai I feel like pnpm has caused more issues than I would like, it is a mono repo that also has an expo app and I used it because of the expo app.
in install command, try adding
--filter
if it helpsThai
yeah now I am getting errors on the build from the
Failed to collect page data for /api/inngest
I always used to get this error in monorepo, regardless of what content the route has, even if it returns "Hello World". I still got it.
Using pnpm in wsl fixed every issue for me.
Using pnpm in wsl fixed every issue for me.
but its in build
Can you just change the content of api/ingest to just return Hello World to see if anything changes
Thai
I think everything comes back to mono repo issues
can you share your file structure
Thai
Like it is throwing this on
But shouldn't it not be collecting data on that since it is dynamic
Failed to collect page data for /api/query-builder/[entityTypeId]
But shouldn't it not be collecting data on that since it is dynamic
@Thai Like it is throwing this on
Failed to collect page data for /api/query-builder/[entityTypeId]
But shouldn't it not be collecting data on that since it is dynamic
I got a similar error before: https://nextjs-forum.com/post/1321452393845755955#message-1321452393845755955
I was able to resolve it by using pnpm.
I recommend you to create a min repro repo, because while I was creating a min repro repo, I was able to solve the problem
I was able to resolve it by using pnpm.
I recommend you to create a min repro repo, because while I was creating a min repro repo, I was able to solve the problem
Thai
oh I think I found it
I think it is a global variable that is failing to initialize