Angular 13 + ngx-moment 6.0.2: This module is declared with using 'export =
See original GitHub issueMultiple error in CLI:
This module is declared with using 'export =', and can only be used with a default import when using the 'allowSyntheticDefaultImports' flag.
Problem goes away if allowSyntheticDefaultImports: true in tsconfig.json
Did you search for duplicate issue? [Yes / No] Yes
Please describe the issue and steps to reproduce, preferably with a code sample / plunker:
Angular update till v13.* Ionic update till 6.* ngx-moment update to 6.0.2 ionic serve/build
- Angular version? 13
- TypeScript version? 4.5.4
moment
version? 2.29.1- Are you using
moment-timezone
? No - Are you using the angular-cli? Yes
- Using Rollup/Webpack/System.js/Ionic/similar? Yes, Ionic
Issue Analytics
- State:
- Created 2 years ago
- Reactions:16
- Comments:5
Top Results From Across the Web
ngx-moment - npm
Start using ngx-moment in your project by running `npm i ngx-moment`. ... This module works with Angular 7.0.0 and newer.
Read more >Error during running angular 13 app after migration
In my case it was an angular workspace, where there was a node_modules folder at the root with a node_modules folder in one...
Read more >type 'modulewithproviders' is not generic - You.com | The search ...
Angular version 9 deprecates use of ModuleWithProviders without an explicitly generic type, where the generic type refers to the type of the NgModule....
Read more >ngx-moment moment.js pipes for Angular - Otcollect Collections
Ngx -moment moment.js pipes for Angular. This module provides momentjs pipes to Parse, validate, manipulate, and display dates and times in ...
Read more >Web-UI - Custombike
```javascript // app.module.ts providers: [ { provide: ... plugins in the "scripts" list of your Angular build declaration * To get karma tests...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If the maintainer changes
import moment from 'moment';
back toimport * as moment from 'moment';
then theallowSyntheticDefaultImports
flag would not need to be set to true in your tsconfig of the project using the dependency.I also faced the same issue with 6.0.2. I think the import statement has been changed to ‘import ‘moment’ from moment;’. Should it be ‘import * as moment from ‘moment’;’? I saw this change while trying between 6.0.1 and 6.0.2.
@vadimwe, Meanwhile, I would advise to switch to 6.0.1 and then try to build the solution.