MomentModule not defined
See original GitHub issueI am using 1.0.0_beta.2 with Angular2 and Ionic 2 RC0 . When I try to build my application, I get the following error. Please help!
[10:46:26] rollup: Export 'MomentModule' is not defined by '/angular2-app/.tmp/app/app.module.ngfactory.js'
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:17 (8 by maintainers)
Top Results From Across the Web
angular - Importing MomentModule but told pipe not found
I'm using Moment for Angular 2 and am stuck. I've followed the instructions, installing angular-moment via NPM and importing MomentModule into ...
Read more >Error: 'moment' module not found? - npm
Hello, as of this morning, I've noticed that those of my notebooks that use the moment npm module, return this error message when...
Read more >ReferenceError: moment is not defined in JavaScript
The "ReferenceError: moment is not defined" error occurs for 2 reasons: Not installing and importing the moment package in a Node.js application. Not...
Read more >ngx-moment
import { MomentModule } from 'ngx-moment'; @NgModule({ imports: ... The key is a unit defined as one of ss , s , m...
Read more >[Solved]-"moment is not defined" using moment.js-moment.js
Coding example for the question "moment is not defined" using moment.js-moment.js. ... moment-duration-format.d.ts Definition Not Extending Moment Module ...
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
Here’s the error that I get
[20:26:08] Error: Module ~myaapp/node_modules/angular2-moment/module.js does not export MomentModule (imported by ~myaapp/.tmp/app/app.module.js)
The following works perfectly for me - inside
app.module.ts
:Then add
MomentModule
to the list of imports:Can you please verify if you have the following file?
node_modules/angular2-moment/module.metadata.json
If it is missing, please remove the angular2-moment directory and reinstall it.