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

Using date-holidays with rollup #301

Open
afuerstenau opened this issue Dec 23, 2021 · 0 comments
Open

Using date-holidays with rollup #301

afuerstenau opened this issue Dec 23, 2021 · 0 comments

Comments

@afuerstenau
Copy link

When I just add date-holidays to package.json I get this:
[!] Error: Unexpected token (Note that you need @rollup/plugin-json to import JSON files) node_modules/moment-timezone/data/packed/latest.json (2:10) 1: { 2: "version": "2021e", ^ 3: "zones": [ 4: "Africa/Abidjan|LMT GMT|g.8 0|01|-2ldXH.Q|48e5", Error: Unexpected token (Note that you need @rollup/plugin-json to import JSON files) at error (/Users/afuerstenau/projects/kundenportal/node_modules/rollup/dist/shared/rollup.js:158:30) at Module.error (/Users/afuerstenau/projects/kundenportal/node_modules/rollup/dist/shared/rollup.js:12354:16) at Module.tryParse (/Users/afuerstenau/projects/kundenportal/node_modules/rollup/dist/shared/rollup.js:12757:25) at Module.setSource (/Users/afuerstenau/projects/kundenportal/node_modules/rollup/dist/shared/rollup.js:12660:24) at ModuleLoader.addModuleSource (/Users/afuerstenau/projects/kundenportal/node_modules/rollup/dist/shared/rollup.js:22138:20)

After some searching I added the @rollup/plugin-json plugin to the rollup-config. Now, I am getting the following error:
[!] Error: 'default' is not exported by node_modules/deepmerge/dist/cjs.js, imported by node_modules/date-holidays-parser/src/utils.js https://rollupjs.org/guide/en/#error-name-is-not-exported-by-module node_modules/date-holidays-parser/src/utils.js (5:7) 3: */ 4: 5: import deepmerge from 'deepmerge' ^ 6: 7: /** Error: 'default' is not exported by node_modules/deepmerge/dist/cjs.js, imported by node_modules/date-holidays-parser/src/utils.js at error (/Users/afuerstenau/projects/kundenportal/node_modules/rollup/dist/shared/rollup.js:158:30) at Module.error (/Users/afuerstenau/projects/kundenportal/node_modules/rollup/dist/shared/rollup.js:12354:16) at Module.traceVariable (/Users/afuerstenau/projects/kundenportal/node_modules/rollup/dist/shared/rollup.js:12739:29) at ModuleScope.findVariable (/Users/afuerstenau/projects/kundenportal/node_modules/rollup/dist/shared/rollup.js:11531:39) at FunctionScope.findVariable (/Users/afuerstenau/projects/kundenportal/node_modules/rollup/dist/shared/rollup.js:6902:38) at ChildScope.findVariable (/Users/afuerstenau/projects/kundenportal/node_modules/rollup/dist/shared/rollup.js:6902:38) at MemberExpression.bind (/Users/afuerstenau/projects/kundenportal/node_modules/rollup/dist/shared/rollup.js:9124:49) at CallExpression.bind (/Users/afuerstenau/projects/kundenportal/node_modules/rollup/dist/shared/rollup.js:4998:23) at CallExpression.bind (/Users/afuerstenau/projects/kundenportal/node_modules/rollup/dist/shared/rollup.js:9368:15) at ReturnStatement.bind (/Users/afuerstenau/projects/kundenportal/node_modules/rollup/dist/shared/rollup.js:4998:23)

I tried to solve the issue by adding export-name to the config but I don't know what exactly to put into the export-name area.

Any help is appreciated.

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