vue-vben-admin
vue-vben-admin copied to clipboard
TypeError: Cannot read properties of undefined (reading 'endsWith')
⚠️ 重要 ⚠️ 在进一步操作之前,请检查下列选项。如果您忽视此模板或者没有提供关键信息,您的 Issue 将直接被关闭
- [x] 已阅读 文档.
- [x] 确保您的代码已是最新或者所报告的 Bug 在最新版本中可以重现. (部分 Bug 可能已经在最近的代码中修复)
- [x] 已在 Issues 中搜索了相关的关键词
- [x] 不是 ant design vue 组件库的 Bug
描述 Bug
pnpm server运行后出现下面的报错
failed to load config from /Users/edy/Desktop/work/template-admin-v3/vite.config.ts
error when starting dev server:
TypeError: Cannot read properties of undefined (reading 'endsWith')
at configHtmlPlugin (/Users/edy/Desktop/work/template-admin-v3/vite.config.ts:385:34)
at createVitePlugins (/Users/edy/Desktop/work/template-admin-v3/vite.config.ts:685:20)
at vite_config_default (/Users/edy/Desktop/work/template-admin-v3/vite.config.ts:762:14)
at loadConfigFromFile (/Users/edy/Desktop/work/template-admin-v3/node_modules/.pnpm/[email protected][email protected]/node_modules/vite/dist/node/chunks/dep-a5ab6d86.js:72020:15)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async resolveConfig (/Users/edy/Desktop/work/template-admin-v3/node_modules/.pnpm/[email protected][email protected]/node_modules/vite/dist/node/chunks/dep-a5ab6d86.js:71546:28)
at async createServer (/Users/edy/Desktop/work/template-admin-v3/node_modules/.pnpm/[email protected][email protected]/node_modules/vite/dist/node/chunks/dep-a5ab6d86.js:57128:20)
at async CAC.
复现 Bug
请描述在演示页面中复现 Bug 的详细步骤,以确保我们可以理解并定位问题。部分 Bug 如果未在 Demo 中涉及,请务必提供关键代码
系统信息
- 操作系统:
- Node 版本:v12.20.0
- 包管理器 (npm/yarn/pnpm) 及其版本:6.28.0
node版本有点低了 16+试试
一样出现了上面的问题 操作系统: mac 10.13.13 Node 版本:v16.14.0 npm:8.5.3 pnpm: 6.32.2
一样出现了上面的问题 操作系统: mac 10.13.13 Node 版本:v16.14.0 npm:8.5.3 pnpm: 6.32.2
if you can run the project correctly. but when you delete the .env.development file or ignored by the .gitignore file then you will find the truth that you meet this error
same question。 操作系统: mac 12.5 Node 版本:v16.16.0 npm:8.15.1
一样出现了上面的问题 操作系统: mac 12.0.1 Node 版本:v16.14.0 npm:8.5.3 有人解决了吗?
是因为根目录下的隐藏文件都被删除了导致的。像.env.development、.gitignore等文件
是因为根目录下的隐藏文件都被删除了导致的。像.env.development、.gitignore 等文件
感谢
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days