Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jalali_moment__WEBPACK_IMPORTED_MODULE_1___namespace_cache is not a function #130

Open
merajseraji opened this issue Oct 18, 2022 · 1 comment

Comments

@merajseraji
Copy link

merajseraji commented Oct 18, 2022

Hi
I use jalali-momnet 3.3.11 in my angular project and I write this function in it. ( baseClassProject )
import * as moment from 'jalali-moment'; static currentDateTime() { return moment().format('jYYYY/jMM/jDD_HH:mm'); }
and then publish baseClassProject then I install the it in my main project and use this.currentDateTime() and I got this error:
image

angular 13.3.0
jalali-moment 3.3.11
can somebody help me ?

@kazazimohamad
Copy link

First :
Add this option to tsconfig.json "allowSyntheticDefaultImports": true

Second:
import 'jalali-moment' like this import moment from 'jalali-moment';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants