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

Failed to load another dependencies in my project #174

Closed
sergiomichels opened this issue Jan 19, 2017 · 5 comments
Closed

Failed to load another dependencies in my project #174

sergiomichels opened this issue Jan 19, 2017 · 5 comments

Comments

@sergiomichels
Copy link

The build have a line with module.exports but module isn't declared anywhere.

https://github.com/Gillardo/bootstrap-ui-datetime-picker/blob/master/dist/datetime-picker.js#L688

If this is script is not the latest to be loaded in an bundle file, the other angular modules will not load correctly.

@Gillardo
Copy link
Owner

This was added by a PR originally and I deleted it but people have asked for it back... if I add an if to check if module is declared does that fix it your end??

@sergiomichels
Copy link
Author

sergiomichels commented Jan 19, 2017

Hmm maybe worth ask the author of the original request, but I think that it should be something like this is script: https://github.com/alferov/angular-file-saver/blob/1.1.0/dist/angular-file-saver.bundle.js#L2

@Gillardo
Copy link
Owner

@sergiomichels can you try and help me test this please? On the last line of your local datetime-picker.js can you change the line

module.exports = 'ui.bootstrap.datetimepicker';

to

if(typeof exports === 'object' && typeof module === 'object') { module.exports = 'ui.bootstrap.datetimepicker'; }

And let me know if the error stops asap?

@Meokme
Copy link

Meokme commented Jan 20, 2017

@Gillardo I'm having the same issue and changing the last line of my local datetime-picker.js as you suggested resolved it for me.

@Gillardo
Copy link
Owner

I have just released 2.5.3 which applies the code above and should fix the issue

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

3 participants