Hello! I’m working my way through Data Visualization with D3 - Full Course for Beginners 2022 on the YouTubes.
I’ve got to the part where you export the project from Vizhub and install it locally.
But I can’t get it to work! I get an error:
When I add --bundleConfigAsCjs
, or if I rename the file to rollup.config.mjs, I get the same error.
I’ve tried adding “type”: “module” to package.json, but then I get a different error: ReferenceError: require is not defined in ES module scope, you can use import instead
.
I thought maybe updating npm and node might help, but it didn’t seem to. I now have npm version 9.8.1 and node version 14.18.1 installed.
I can’t figure it out! Please can you help me?
Thanks for a great course
Ed