iamkun / iamkun/dayjs

Maximum call stack size exceeded

Open
#1,250 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
48.7k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

Hello. I use day.js(1.9.1) for my ERP, it works nice, but after some time it gives me this error:
```
Maximum call stack size exceeded
at Function.[Symbol.hasInstance] ()
at d.o.parse (/data/services/dmce-erp/service-dist/node_modules/dayjs/plugin/customParseFormat.js:1:2721)
at d.o.parse (/data/services/dmce-erp/service-dist/node_modules/dayjs/plugin/customParseFormat.js:1:2903)
at d.o.parse (/data/services/dmce-erp/service-dist/node_modules/dayjs/plugin/customParseFormat.js:1:2903)
at d.o.parse (/data/services/dmce-erp/service-dist/node_modules/dayjs/plugin/customParseFormat.js:1:2903)
at d.o.parse (/data/services/dmce-erp/service-dist/node_modules/dayjs/plugin/customParseFormat.js:1:2903)
at d.o.parse (/data/services/dmce-erp/service-dist/node_modules/dayjs/plugin/customParseFormat.js:1:2903)
at d.o.parse (/data/services/dmce-erp/service-dist/node_modules/dayjs/plugin/customParseFormat.js:1:2903)
at d.o.parse (/data/services/dmce-erp/service-dist/node_modules/dayjs/plugin/customParseFormat.js:1:2903)
at d.o.parse (/data/services/dmce-erp/service-dist/node_modules/dayjs/plugin/customParseFormat.js:1:2903)
at d.o.parse (/data/services/dmce-erp/service-dist/node_modules/dayjs/plugin/customParseFormat.js:1:2903)
```
How to fix this issue?

Contributor guide

Open the contributing guide

Research direction

Start with plugin/customParseFormat.js, the file named in the stack trace, and inspect the repeated d.o.parse calls leading to the stack overflow. Reproduce the reported Maximum call stack size exceeded failure and confirm that the parsing path no longer recurses indefinitely.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.