iamkun / iamkun/dayjs

TypeError: dayjs_1.default is not a function

Open
#1,667 2 comments 7 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**
Similar to this https://github.com/iamkun/dayjs/issues/475
```
TypeError: dayjs_1.default is not a function
controls: 20 | },
controls: 21 | 'RollupEstActiveUsers': 1,
controls: > 22 | 'EstCompletionDate': dayjs('1111-11-11'),
```
**Expected behavior**
For my tests to pass and not consider dayjs to not be a function.

**Information**
- Day.js Version 1.10.7
- OS: MacOs and Windows
- Browser Chrome 94.0.4606.7
- Time zone: (Pacific Daylight Time)

Contributor guide

Open the contributing guide

Research direction

Start with the failing test at the `EstCompletionDate` call shown in the report and inspect how Day.js 1.10.7 is imported and executed in that test environment. Compare the setup with the linked Day.js issue; done means the test treats `dayjs` as callable and passes on the reported environments.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.