fix: 删除冲突的 routes.js,修复路由导入错误

## 问题
应用启动报错:
```
Error: Element type is invalid: expected a string or a class/function
but got: object.

Check the render method of AppContent.
```

## 根本原因
模块路径冲突导致导入错误:
- `App.js` 导入 `import AppRoutes from './routes'`
- 存在两个文件:
  1.  `src/routes.js`(空数组)← 被优先导入
  2.  `src/routes/index.js`(路由组件)← 应该导入的

Node.js 模块解析优先选择文件而非目录,导致 AppRoutes
被解析为空数组而非 React 组件。

## 解决方案
删除已废弃的 `src/routes.js`:
- 该文件注释说明"保留仅为兼容可能的旧引用"
- 内容仅为空数组 `dashRoutes = []`
- 删除后 `./routes` 自动解析为 `./routes/index.js`

## 影响
-  修复应用启动错误
-  路由正确加载
-  无其他文件引用此文件(已验证)

## 验证
需要重启开发服务器以应用更改。

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
zdl
2025-10-30 15:28:40 +08:00
parent ed2837bf56
commit d5e75109bc

View File

@@ -1,27 +0,0 @@
/*!
=========================================================
* Argon Dashboard Chakra PRO - v1.0.0
=========================================================
* Product Page: https://www.creative-tim.com/product/argon-dashboard-chakra-pro
* Copyright 2022 Creative Tim (https://www.creative-tim.com/)
* Designed and Coded by Simmmple & Creative Tim
=========================================================
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*/
import React from "react";
// ⚠️ Admin 布局已移除
// 实际路由配置现在在 /src/App.js 中
// 此文件保留仅为兼容可能的旧引用
// 导出空数组以保持向后兼容
const dashRoutes = [];
export default dashRoutes;