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

v-else used on element <td> without corresponding v-if #143

Closed
adamshaylor opened this issue Apr 7, 2021 · 1 comment
Closed

v-else used on element <td> without corresponding v-if #143

adamshaylor opened this issue Apr 7, 2021 · 1 comment

Comments

@adamshaylor
Copy link

adamshaylor commented Apr 7, 2021

  1. npm init on an empty directory.
  2. Follow the Parcel 2 instructions for creating a Vue project.
  3. npm i --save @coreui/vue@3.2.9
  4. Add Vue.use(CoreuiVue); from @coreui/vue/src per the pro admin template.
  5. npm run dev

Expected

The project should compile without error.

Saw

🚨  /[path to project]/node_modules/@coreui/vue/src/components/table/CDataTable.vue: v-else used on element <td> without corresponding v-if.
    at VueAsset.compileTemplate (/[path to project]/node_modules/parcel-bundler/src/assets/VueAsset.js:152:15)
    at VueAsset.postProcess (/[path to project]/node_modules/parcel-bundler/src/assets/VueAsset.js:100:26)
    at Pipeline.processAsset (/[path to project]/node_modules/parcel-bundler/src/Pipeline.js:90:31)
    at async Pipeline.process (/[path to project]/node_modules/parcel-bundler/src/Pipeline.js:24:23)
    at async Object.run (/[path to project]/node_modules/parcel-bundler/src/worker.js:15:12)
    at async Child.handleRequest (/[path to project]/node_modules/@parcel/workers/src/child.js:60:26)

The only reason I can think of for the discrepancy between Parcel and Vue CLI behavior that came with the template is that the error Parcel is choking on is technically only warning. Whether we consider it an warning or an outright error, it’s:

  1. Breaking Parcel.
  2. Not great code because the v-else is not on a matching element type.
  3. Easily remedied by using another v-if with a negated version of the same condition.
adamshaylor added a commit to pollinate/coreui-vue that referenced this issue Apr 7, 2021
adamshaylor added a commit to pollinate/coreui-vue that referenced this issue Apr 7, 2021
xidedix added a commit that referenced this issue May 20, 2021
…aylor

- closes #143 v-else used on element <td> without corresponding v-if
- closes #144 fix: CDataTable: v-else compiler warning
@xidedix
Copy link
Member

xidedix commented May 20, 2021

thanks @adamshaylor - closed with 652cac8

@xidedix xidedix closed this as completed May 20, 2021
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

2 participants