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

Module not found: Error: Can't resolve './locale' in #68

Open
goanpeca opened this issue Feb 16, 2024 · 2 comments
Open

Module not found: Error: Can't resolve './locale' in #68

goanpeca opened this issue Feb 16, 2024 · 2 comments

Comments

@goanpeca
Copy link

goanpeca commented Feb 16, 2024

Hi @ericz1803, thanks for the awesome project.

We are using this component inside an mdx file using docusaurus. When running the build step, we are getting
the following errors:

[WARNING] {"moduleIdentifier":"/Users/gpenacastellanos/Desktop/develop/conda-forge/conda-dot-org/node_modules/@ericz1803/react-google-calendar/dist/react-google-calendar.es.js","moduleName":"./node_modules/@ericz1803/react-google-calendar/dist/react-google-calendar.es.js","loc":"2699:33-51","message":"Module not found: Error: Can't resolve './locale' in '/Users/gpenacastellanos/Desktop/develop/conda-forge/conda-dot-org/node_modules/@ericz1803/react-google-calendar/dist'","compilerPath":"client"}

[WARNING] {"moduleIdentifier":"/Users/gpenacastellanos/Desktop/develop/conda-forge/conda-dot-org/node_modules/@ericz1803/react-google-calendar/dist/react-google-calendar.es.js","moduleName":"./node_modules/@ericz1803/react-google-calendar/dist/react-google-calendar.es.js","loc":"2699:33-51","message":"Module not found: Error: Can't resolve './locale' in '/Users/gpenacastellanos/Desktop/develop/conda-forge/conda-dot-org/node_modules/@ericz1803/react-google-calendar/dist'","compilerPath":"server"}

I saw this issue #60, that seems related. Not sure what has changed recently 🤔

Thanks!

@goanpeca
Copy link
Author

Hi @ericz1803, thanks for the project :)

We are working with docusaurus, to embed the calendar as a component within an MDX page. We have updated to the latest dependencies, but we are still facing some issues.

4:00:43 PM: [WARNING] {"moduleIdentifier":"/opt/build/repo/node_modules/@ericz1803/react-google-calendar/dist/react-google-calendar.es.js","moduleName":"./node_modules/@ericz1803/react-google-calendar/dist/react-google-calendar.es.js","loc":"2699:33-51","message":"Module not found: Error: Can"t resolve "./locale" in "/opt/build/repo/node_modules/@ericz1803/react-google-calendar/dist"","compilerPath":"client"}
4:00:43 PM: [WARNING] {"moduleIdentifier":"/opt/build/repo/node_modules/@ericz1803/react-google-calendar/dist/react-google-calendar.es.js","moduleName":"./node_modules/@ericz1803/react-google-calendar/dist/react-google-calendar.es.js","loc":"2699:33-51","message":"Module not found: Error: Can"t resolve "./locale" in "/opt/build/repo/node_modules/@ericz1803/react-google-calendar/dist"","compilerPath":"server"}
4:00:43 PM: Error: Unable to build website for locale en.
4:00:43 PM: at tryToBuildLocale (/opt/build/repo/node_modules/@docusaurus/core/lib/commands/build.js:55:19)
4:00:43 PM: at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
4:00:43 PM: at async mapAsyncSequential (/opt/build/repo/node_modules/@docusaurus/utils/lib/jsUtils.js:44:24)
4:00:43 PM: at async Command.build (/opt/build/repo/node_modules/@docusaurus/core/lib/commands/build.js:82:21) {
4:00:43 PM: [cause]: Error: Failed to compile due to Webpack errors.
4:00:43 PM: Error: Docusaurus server-side rendering could not render static page with path /community/calendar because of error: Cannot read properties of null (reading "registered")
4:00:43 PM: at /opt/build/repo/node_modules/@docusaurus/core/lib/webpack/utils.js:207:24
4:00:43 PM: at /opt/build/repo/node_modules/webpack/lib/MultiCompiler.js:580:14
4:00:43 PM: at processQueueWorker (/opt/build/repo/node_modules/webpack/lib/MultiCompiler.js:517:6)
4:00:43 PM: at process.processTicksAndRejections (node:internal/process/task_queues:77:11)
4:00:43 PM: }
4:00:43 PM: [INFO] Docusaurus version: 3.1.1
4:00:43 PM: Node version: v18.19.1

Do you think is something related to the component, I am not sure what might be causing the issues. Thanks for the help!

@daisukeibi
Copy link

daisukeibi commented Mar 12, 2024

Hello @ericz1803

This error seems to be caused by raising 'moment' version to "^2.29.4".
I downgraded this library to 4.2.2 and the error no longer appears.

Reference link: moment/moment#5472
Relevant commit: 510dd9a#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b64815 75d519R38

I hope this helps and fixes it.

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