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

At least one <template> or <script> is required in a single file component. #2801

Closed
4 tasks done
xanggang opened this issue Aug 17, 2023 · 5 comments
Closed
4 tasks done
Labels
bug Something isn't working upstream Related to the dependencies

Comments

@xanggang
Copy link

Describe the bug

When the project first starts: At least one <template> or <script> is required in a single file component.

Reproduction

https://stackblitz.com/edit/vite-nnfopi?file=docs%2Findex.md

Expected behavior

Normal

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 16.20.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 9.4.2 - /usr/local/bin/npm
    pnpm: 8.6.10 - /usr/local/bin/pnpm
  npmPackages:
    vitepress: latest => 1.0.0-rc.4

Additional context

No response

Validations

@xanggang xanggang added the bug: pending triage Maybe a bug, waiting for confirmation label Aug 17, 2023
@changweihua
Copy link

The same error was found under github workflow

@brc-dd brc-dd added bug Something isn't working and removed bug: pending triage Maybe a bug, waiting for confirmation labels Aug 17, 2023
@changweihua
Copy link

image

@changweihua
Copy link

I tried to fix it by using

"overrides": {
"@vitejs/plugin-vue": "4.2.3"
},

It seems works fine.

@zyf540860996
Copy link

image

"dependencies": {
"vue": "^3.3.4"
},
"devDependencies": {
"typescript": "^5.0.2",
"vite": "^4.4.5",
"vue-tsc": "^1.8.5",
"@vitejs/plugin-vue": "4.2.3",
"vitepress": "1.0.0-alpha.76"
}

@brc-dd brc-dd added the upstream Related to the dependencies label Aug 17, 2023
haoqunjiang added a commit to vitejs/vite-plugin-vue that referenced this issue Aug 17, 2023
@brc-dd brc-dd closed this as completed Aug 17, 2023
@brc-dd
Copy link
Member

brc-dd commented Aug 17, 2023

use @vitejs/plugin-vue@4.3.1 -- remove it from overrides/deps and regenerate your lockfiles.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working upstream Related to the dependencies
Projects
None yet
Development

No branches or pull requests

4 participants