fix: template uses lang html for template, however it is not installed
See original GitHub issueEnvironment
- 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:
- Created a year ago
- Comments:6 (5 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
✔️ 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.vueThe 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
Well, this one says
and the one I’m using
so I’d stay with my choice for now.