Open fujikky opened 2 years ago
Hey, I believe I am also facing this issue but with NodeJs. Did you manage to solve this?
My Jest problem was solved by adding moduleNameMapper
as a workaround.
jest.config.js
:
moduleNameMapper: {
"astronomia\\/data\\/vsop87Bearth": "astronomia/lib/data/vsop87Bearth.cjs",
},
If you are using webpack, you may be able to fix it by adding the same settings to resolve.alias
in the config.
resolve: {
alias: {
"astronomia/data/vsop87Bearth": "astronomia/lib/data/vsop87Bearth.cjs",
},
},
Thanks @fujikky. I am using Node with Next.js and not sure how to configure that to get rid of the problem. However, last night I upgraded Node version to 14.x and that seems to have fixed the problem.
As of v3.3.0, the import destination for
astronomia
invsop87Bearth.cjs
seems to have changed.v3.2.4 https://unpkg.com/date-holidays-parser@3.2.4/lib/vsop87Bearth.cjs
v3.3.0 https://unpkg.com/date-holidays-parser@3.3.0/lib/vsop87Bearth.cjs
This caused syntax errors in module systems that use CJS, such as Jest.