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

v2.4.0 启动报错 #361

Closed
geekidentity opened this issue Oct 25, 2023 · 6 comments
Closed

v2.4.0 启动报错 #361

geekidentity opened this issue Oct 25, 2023 · 6 comments

Comments

@geekidentity
Copy link

image

➜ pnpm -v
8.9.2

➜ node -v
v21.1.0
@geekidentity
Copy link
Author

> vite --mode base

                                                                                                                                                                 5:30:46 PM
  VITE v4.4.11  ready in 1972 ms

  ➜  Local:   http://localhost:4000/                                                                                                                             5:30:46 PM
  ➜  Network: http://10.253.0.171:4000/                                                                                                                          5:30:46 PM
  ➜  press h to show help                                                                                                                                        5:30:46 PM

 ERROR  5:30:52 PM [vite] Internal server error:                                                                                                                 5:30:52 PM
/Users/houfachao/workspaces/vue-element-plus-admin/src/views/Login/Login.vue
  74:13  error  The element inside <transition> is expected to have a v-if or v-show directive  vue/require-toggle-inside-transition

✖ 1 problem (1 error, 0 warnings)

  Plugin: vite-plugin-eslint
  File: /Users/houfachao/workspaces/vue-element-plus-admin/src/views/Login/Login.vue
      at formatError (file:///Users/houfachao/workspaces/vue-element-plus-admin/node_modules/.pnpm/registry.npmmirror.com+vite@4.4.11_@types+node@20.8.8_less@4.2.0_terser@5.22.0/node_modules/vite/dist/node/chunks/dep-2b82a1ce.js:44055:46)
      at TransformContext.error (file:///Users/houfachao/workspaces/vue-element-plus-admin/node_modules/.pnpm/registry.npmmirror.com+vite@4.4.11_@types+node@20.8.8_less@4.2.0_terser@5.22.0/node_modules/vite/dist/node/chunks/dep-2b82a1ce.js:44051:19)
      at TransformContext.transform (/Users/houfachao/workspaces/vue-element-plus-admin/node_modules/.pnpm/registry.npmmirror.com+vite-plugin-eslint@1.8.1_eslint@8.52.0_vite@4.4.11/node_modules/vite-plugin-eslint/dist/index.js:1:2469)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async Object.transform (file:///Users/houfachao/workspaces/vue-element-plus-admin/node_modules/.pnpm/registry.npmmirror.com+vite@4.4.11_@types+node@20.8.8_less@4.2.0_terser@5.22.0/node_modules/vite/dist/node/chunks/dep-2b82a1ce.js:44345:30)
      at async loadAndTransform (file:///Users/houfachao/workspaces/vue-element-plus-admin/node_modules/.pnpm/registry.npmmirror.com+vite@4.4.11_@types+node@20.8.8_less@4.2.0_terser@5.22.0/node_modules/vite/dist/node/chunks/dep-2b82a1ce.js:55015:29)
      at async viteTransformMiddleware (file:///Users/houfachao/workspaces/vue-element-plus-admin/node_modules/.pnpm/registry.npmmirror.com+vite@4.4.11_@types+node@20.8.8_less@4.2.0_terser@5.22.0/node_modules/vite/dist/node/chunks/dep-2b82a1ce.js:64417:32)


 ERROR  5:30:57 PM [vite] Internal server error:                                                                                                                 5:30:57 PM
/Users/houfachao/workspaces/vue-element-plus-admin/src/views/Login/Login.vue
  74:13  error  The element inside <transition> is expected to have a v-if or v-show directive  vue/require-toggle-inside-transition

✖ 1 problem (1 error, 0 warnings)

  Plugin: vite-plugin-eslint
  File: /Users/houfachao/workspaces/vue-element-plus-admin/src/views/Login/Login.vue
      at formatError (file:///Users/houfachao/workspaces/vue-element-plus-admin/node_modules/.pnpm/registry.npmmirror.com+vite@4.4.11_@types+node@20.8.8_less@4.2.0_terser@5.22.0/node_modules/vite/dist/node/chunks/dep-2b82a1ce.js:44055:46)
      at TransformContext.error (file:///Users/houfachao/workspaces/vue-element-plus-admin/node_modules/.pnpm/registry.npmmirror.com+vite@4.4.11_@types+node@20.8.8_less@4.2.0_terser@5.22.0/node_modules/vite/dist/node/chunks/dep-2b82a1ce.js:44051:19)
      at TransformContext.transform (/Users/houfachao/workspaces/vue-element-plus-admin/node_modules/.pnpm/registry.npmmirror.com+vite-plugin-eslint@1.8.1_eslint@8.52.0_vite@4.4.11/node_modules/vite-plugin-eslint/dist/index.js:1:2469)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async Object.transform (file:///Users/houfachao/workspaces/vue-element-plus-admin/node_modules/.pnpm/registry.npmmirror.com+vite@4.4.11_@types+node@20.8.8_less@4.2.0_terser@5.22.0/node_modules/vite/dist/node/chunks/dep-2b82a1ce.js:44345:30)
      at async loadAndTransform (file:///Users/houfachao/workspaces/vue-element-plus-admin/node_modules/.pnpm/registry.npmmirror.com+vite@4.4.11_@types+node@20.8.8_less@4.2.0_terser@5.22.0/node_modules/vite/dist/node/chunks/dep-2b82a1ce.js:55015:29)
      at async viteTransformMiddleware (file:///Users/houfachao/workspaces/vue-element-plus-admin/node_modules/.pnpm/registry.npmmirror.com+vite@4.4.11_@types+node@20.8.8_less@4.2.0_terser@5.22.0/node_modules/vite/dist/node/chunks/dep-2b82a1ce.js:64417:32) (x2)

@kailong321200875
Copy link
Owner

node 换成16版本的试试看 @geekidentity

@notlaughingzzm
Copy link

同报错,node版本16.14.2

@chixianliangGithub
Copy link

我也有这个错误
Uploading image.png…

@chenyRain
Copy link

chenyRain commented Oct 26, 2023

这是eslint-plugin-vue 引起的 transition中的div中需要加if或者show
https://eslint.vuejs.org/rules/require-toggle-inside-transition.html

  <!-- ✓ GOOD -->
  <transition><div v-if="show" /></transition>
  <transition><div v-show="show" /></transition>

  <!-- ✗ BAD -->
  <transition><div /></transition>
</template>```

@Buster-00
Copy link

same

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

6 participants