Skip to content

Preinstall installs devDependencies #17

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

Closed
james-criscuolo opened this issue Apr 7, 2017 · 4 comments
Closed

Preinstall installs devDependencies #17

james-criscuolo opened this issue Apr 7, 2017 · 4 comments

Comments

@james-criscuolo
Copy link

Do I need that preinstall set if I don't plan on developing inside the library? I'd like to use it, but I don't want to install those extra libraries, or force my team to as well. This occurs when just doing a normal npm install angular-2-daterangepicker.

@technikhil314
Copy link
Owner

technikhil314 commented Apr 8, 2017

no that's right you do not need to install those. I did not realize I have left it there in scripts, I have removed it. Please take latest version. And thank you for pointing it out. And please close the issue if it solves you problem, and let me know if you have any trouble with the package.

@james-criscuolo
Copy link
Author

Next problem I hit seems to be another small change, that I believe only matters with webpack, but should be beneficial in general. The error reads:

Uncaught Error: moduleId should be a string in "DaterangepickerComponent". See https://goo.gl/wIDDiL for more information.
If you're using Webpack you should inline the template and the styles, see https://goo.gl/X2J8zc.

Angular-cli has an open issue about it: angular/angular-cli#3576. I haven't looked into it deeply enough to determine if this is a fault of webpack or angular, but just adding .toString() to module.id in the components should fix it. It looks like the typescript -> javascript conversion adds this metadata automatically, so maybe manually including it in typescript would be the solution.

I did test, and editing in the .toString() to daterangepicker-component.js and calendar-component.js does fix this, and I am able to successfully load the daterangepicker at that point.

@technikhil314
Copy link
Owner

technikhil314 commented Apr 11, 2017

sure i wll remove the dependancy on it. webpack seems to give problem with it. Please take version 1.1.20 I have removed dependacy on module.id. Thank you for your support.

@technikhil314
Copy link
Owner

@james-criscuolo Closing the issue. Assuming your issue is solved.

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