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: Cannot resolve module 'cldr' - in cypress tests #941

Open
nensidosari opened this issue Apr 28, 2023 · 0 comments

Comments

@nensidosari
Copy link

nensidosari commented Apr 28, 2023

I am trying to use one package that contains globalize in our cypress tests, but am failing to use it because of Webpack Compilation Error that shows up.

I am already using this library inside the app, I am only unable to use it within cypress tests.
The error that shows up is this when trying to use the library that contains globalize.

Error: Webpack Compilation Error ./node_modules/globalize/dist/globalize.js Module not found: Error: Can't resolve 'cldr' in '/Users/nnn/project/acceptance-tests-cypress/node_modules/globalize/dist' resolve 'cldr' in '/Users/nnn/project/acceptance-tests-cypress/node_modules/globalize/dist' Parsed request is a module using description file: /Users/nnn/project/acceptance-tests-cypress/node_modules/globalize/package.json (relative path: ./dist) Field 'browser' doesn't contain a valid alias configuration resolve as module /Users/nnn/project/acceptance-tests-cypress/node_modules/globalize/dist/node_modules doesn't exist or is not a directory /Users/nnn/project/acceptance-tests-cypress/node_modules/globalize/node_modules doesn't exist or is not a directory .....

All the files being searched exist in node_modules where they are supposed to.

From research, Globalize may not work nicely with Webpack natively, which is the bundler cypress uses. Similar issue to this previously raised #603.

I would appreciate any suggestion on how to resolve this 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

1 participant