ditdot-dev/vue-flow-form

Bug: rollup --config build/rollup.config.js fails - [name] is not exported by [module]

tzabian opened this issue · 2 comments

Describe the bug
When attempting to build an npm package using rollup (or npm run build:npm), the script fails with the following:

rollup --config build/rollup.config.js

src/main.js → dist/vue-flow-form.umd.js...
(!) Error when using sourcemap for reporting an error: Can't resolve original location of error.
src/components/QuestionTypes/DropdownType.vue?vue&type=template&id=96838bd2&lang.js: (1:9)
[!] Error: 'createVNode' is not exported by node_modules/vue/dist/vue.runtime.esm.js, imported by src/components/QuestionTypes/DropdownType.vue?vue&type=template&id=96838bd2&lang.js
https://rollupjs.org/guide/en/#error-name-is-not-exported-by-module
src/components/QuestionTypes/DropdownType.vue?vue&type=template&id=96838bd2&lang.js (1:9)

Seems like there are failed import/export sequences required for rollup to do its job. I initially thought this was a commonJS issue but seems its an issue with the vue plugin itself and can't really pinpoint the issue. How was the initial NPM package being compiled? Is there an undocumented workaround I'm missing?

To Reproduce
run npm run build:npm

Expected behavior
dist directory created with the expected JS/CSS files to consumption.

spinn commented

Have you made any modifications to the project and/or rollup.config.js? I tried on two different systems running different operating systems and haven't been able to reproduce your issue when using a clean project.

spinn commented

Closing issue due to inactivity and insufficient details. Of course feel free to re-open it with additional details if this still doesn't work for you.