globalizejs / globalizejs/globalize
Module not found: Error: Cannot resolve module 'cldr' - in cypress tests
- Dominant language
- JavaScript
- Stars
- 4.8k
- Forks
- 585
- PR merge metrics
- No merged PRs in 30d
Description
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 https://github.com/globalizejs/globalize/issues/603.
I would appreciate any suggestion on how to resolve this issue.
Contributor guide
Assessment
This issue has not been assessed yet.