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

Error: Cannot find module './locale' #213

Closed
polbadman opened this issue Dec 1, 2020 · 2 comments
Closed

Error: Cannot find module './locale' #213

polbadman opened this issue Dec 1, 2020 · 2 comments

Comments

@polbadman
Copy link

polbadman commented Dec 1, 2020

سلام به همه:
من این کدو توی راکت وارد می کنم و خطا می ده؟
import moment from "moment-jalaali";
import fa from "moment/src/locale/fa";
moment.locale("fa", fa);
moment.loadPersian();

...

{moment(product.createdAt).fromNow()}

@DivineAlien
Copy link

i have the same issue. i tried also version 0.7.3 but it's not working.

npm install [email protected] 

still the same

@DivineAlien
Copy link

DivineAlien commented Jan 18, 2021

the only way to this problem for me was.
changing the line:

 import fa from "moment/src/locale/fa";

to

import fa from "moment/locale/fa";

is this a good practice?! @behrang
#212

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