iamkun / iamkun/dayjs

customParseFormat error only in production

Open
#1,767 2 comments 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

**Describe the bug**
Production build throws the following error. However, it works fine locally. This package is being used in [excelJs](https://github.com/exceljs/exceljs) as a dependency. I am not using it directly in my project.

```
Application has thrown an uncaught exception and is terminated:TypeError: Cannot set property 'customParseFormat' of undefinedat D:\home\site\wwwroot\node_modules\dayjs\plugin\customParseFormat.js:1:2697
```

**Information**
- Day.js Version - dayjs@1.10.7
- OS: [Microsoft Windows [Version 10.0.14393]

Contributor guide

Open the contributing guide

Research direction

Start with plugin/customParseFormat.js and compare how it is loaded in the local and production builds. Reproduce the reported TypeError with Day.js 1.10.7 on the stated Windows environment, considering its use through ExcelJS. Done means the production build loads customParseFormat without the reported error.

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.