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
./locale not found issue #230
Comments
What type of bundling are you using? |
I am using angular-cli. Is that the one you are asking? |
Same error if we use it in a angular cli project Module not found: Error: Can't resolve './locale' in 'node_modules\ng2-date-picker\node_modules\moment\src\lib\locale' using the ng2-date-picker |
@keshav1007, angular cli is using webpack behind the scenes. Could you please post a simple demo project? |
@priyanka3110, Could you please post a simple demo project? |
https://github.com/sweeti270789/angular-date-picker-demo using the ng2-date-picker which throw above error ---Priyanka |
Please provide a full demo - including the ng2-date-picker module. |
its full demo using the ng2-date-picker-module installed using npm |
I can't see it in https://github.com/sweeti270789/angular-date-picker-demo/blob/master/package.json (package.json). Sorry, but it is hard for me to create demos for each issue :) |
Now you can check I forgot to save in package json, sorry, |
I will. thanks! |
|
After using moment 2.18.1 the issue is resolved |
From my understanding, if you want to use a specific locale, you have to add it to your dependencies. I will add this note to the documentation. |
Agreed, locally this can be fixed with a npm install moment@2.18.1. But this issue fails on our CI/CD pipelines due to the way package.json has "^2.17.1" for moment dependency. Is there any resolution for such scenarios? |
@echerepanova, sure. You need to add it to your package.json with specific version. (without ^) |
@priyanka3110 , I cloned your demo project. And didn't get any error :/ |
@priyanka3110, @keshav1007 I really want to solve this before releasing 2.6.0. I would need your help in reproducing this issue. I tried using @priyanka3110 demo, but didn't get any error. Could you please try to reproduce the issue in the demo page of this component? let me know if you need any help or having any question. |
will close this for now |
Since date picker installs moment 2.19.1 there is a known issue with ./locale not found
moment/moment#2979
So how can i avoid this?
Solution is provided for webpacks but i am not using webpack.
The text was updated successfully, but these errors were encountered: