question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

fix: template uses lang html for template, however it is not installed

See original GitHub issue

Environment

  • Operating System: Linux
  • Node Version: v14.19.3
  • Nuxt Version: 3.0.0-rc.9
  • Nitro Version: 0.5.1
  • Package Manager: yarn@1.22.19
  • Builder: vite
  • User Config: telemetry
  • Runtime Modules: -
  • Build Modules: -

Reproduction

https://codesandbox.io/s/template-lang-html-dzr7f2?file=/pages/index.vue

Describe the bug

Setting lang="html" on a template tag yields the following error in @vitejs/plugin-vue:

 ERROR  Component /.../pages/index.vue uses lang html for template, however it is not installed.         19:16:56

  at error (node_modules/.pnpm/rollup@2.77.3/node_modules/rollup/dist/es/shared/rollup.js:1858:30)
  at throwPluginError (node_modules/.pnpm/rollup@2.77.3/node_modules/rollup/dist/es/shared/rollup.js:21764:12)
  at Object.error (node_modules/.pnpm/rollup@2.77.3/node_modules/rollup/dist/es/shared/rollup.js:22486:20)
  at Object.error (node_modules/.pnpm/rollup@2.77.3/node_modules/rollup/dist/es/shared/rollup.js:21941:42)
  at node_modules/.pnpm/@vitejs+plugin-vue@3.1.0_vite@3.0.9+vue@3.2.38/node_modules/@vitejs/plugin-vue/dist/index.mjs:161:32
  at Array.forEach (<anonymous>)
  at compile (node_modules/.pnpm/@vitejs+plugin-vue@3.1.0_vite@3.0.9+vue@3.2.38/node_modules/@vitejs/plugin-vue/dist/index.mjs:160:19)
  at transformTemplateAsModule (node_modules/.pnpm/@vitejs+plugin-vue@3.1.0_vite@3.0.9+vue@3.2.38/node_modules/@vitejs/plugin-vue/dist/index.mjs:130:18)
  at Object.transform (node_modules/.pnpm/@vitejs+plugin-vue@3.1.0_vite@3.0.9+vue@3.2.38/node_modules/@vitejs/plugin-vue/dist/index.mjs:2653:18)
  at node_modules/.pnpm/rollup@2.77.3/node_modules/rollup/dist/es/shared/rollup.js:22695:37

Additional context

I’m not sure if that’s an upstream issue. What do you think?

There was a similar issue, which was closed with a workaround: https://github.com/vuejs/rollup-plugin-vue/issues/256

Logs

No response

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
dargmueslicommented, Dec 3, 2022

✔️ Did so: https://github.com/vitejs/vite-plugin-vue/issues/17

Vue 3 docs specify such preprocessors under their SFC Syntax.

The last given reproduction does not have a lang attribute set for me, is it the correct link? I created this for now: https://stackblitz.com/edit/vitejs-vite-wdafsc?file=src/App.vue

The library I linked does support Vue 3 under https://github.com/gruhn/vue-qrcode-reader/tree/vue3-compatibility / https://www.npmjs.com/package/vue-qrcode-reader/v/3.1.0-vue3-compatibility.2

0reactions
dargmueslicommented, Nov 14, 2022

Well, this one says

“JavaScript library for generating QR codes”

and the one I’m using

“Vue.js components, allowing you to detect and decode QR codes”

so I’d stay with my choice for now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Component <path/name.vue> uses lang html for template ...
vue uses lang html for template, however it is not installed. node_modules/convenia-components/src/components/CTooltip/index.vue Error: ...
Read more >
Django template language how to fix - Stack Overflow
I think you're missing a slash before index.html in your render statement. Try this: return render(request, '/index.html', context).
Read more >
Pandoc User's Guide
If the template is not found, pandoc will search for it in the templates subdirectory of the user data directory (see --data-dir )....
Read more >
Template:Lang/doc - Wikipedia
The purpose of this template is to indicate that a span of text belongs to a particular language. It often makes no visible...
Read more >
Envato Elements Template Kits - Troubleshooting Common ...
This guide provides general help for common issues you may encounter when using the Template Kit Import or Envato Elements plugins.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found