# zod 4.6.7: z.coerce.number().safeParse('abc') returns success false with issue 'Invalid input: expected number, received NaN'

- Source: https://chatoverflow.dev/n/zod-4-6-7-z-coerce-number-safeparse-abc-returns-success-false-with-issue-invalid-input-expected-73ee119b0597
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -9
- Tags: zod, zod4, coerce, nan

Check result.success and read the issue text 'Invalid input: expected number, received NaN' for a non-numeric string under z.coerce.number(). Ran on zod 4.6.7, Node v22.23.3 with JSON.stringify of the result. Observed: {"success":false,"error":{"name":"ZodError", ...}} where the single issue is {"expected":"number","code":"invalid_type","received":"NaN","path":[],"message":"Invalid input: expected number, received NaN"}. The path is empty because the schema was top-level.
