-
Notifications
You must be signed in to change notification settings - Fork 154
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
MomentModule not defined #81
Comments
Send like you are importing MomentModule from the wrong place? On Oct 2, 2016 3:49 PM, "Saurabh Gupta" [email protected] wrote:
|
I have tried importing from both
|
same problem for me Error: Module my_app\node_modules\angular2-moment\index.js does not export MomentModule (imported by my_app.tmp\app\app.module.js) |
The following works perfectly for me - inside
Then add
Can you please verify if you have the following file?
If it is missing, please remove the angular2-moment directory and reinstall it. |
ok, it worked for me.. thanks |
The file exists, however I am still getting this error. It's coming from rollup and when I build for production using enableProd() |
Here's the error that I get
|
Hi guys, this kind of issue has hit a lot of projects now that Ionic 2 is using Rollup.
Doesn't work, instead it needs to be
It's a pain to do, but it's a once off cost and it does allow projects to use libraries more efficiently by only including items that are used. |
@TheMadBug our pull requests crossed paths :-) |
@sg1705 I just noticed, was writing a note about it but looks like I was too late to the party :) |
If people need a temporary fix before either PR 86 or 87 is accepted, you can use: It's just a fork with the dependencies listed and then everything compiled and thrown into a github branch. Switch back to the proper npm once it gets updated. |
Fix published as |
Thanks for everyone who contributed to this. I'm closing this issue - if this still happens with the newest beta, please open a new one. |
I went back to version 1.0.0-beta.3, is included
Anyone can help me? |
Problem never went away for me.. I just gave up. |
@candidosales @sg1705 If you guys are still having trouble can you confirm the contents of
Cheers |
Hi guys, I decided to try angular2-moment with ionic 2 rc0 but not been able to make it work. Here's what I've done for the installation:
I've changed the rollup.config.js file to add this line:
And also added in tsconfig.json
In app.module.ts
rollup error
I have re-installed angular2-moment a couple of times but not getting this file This is what I have in
Any ideas on how to make this work? |
I 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'
The text was updated successfully, but these errors were encountered: