Describe the Bug.
需要确认样式冲突问题,报错500
Reproduction Steps
Bug 复现步骤模板
环境信息
- **操作系统**: Windows 11
- **Next.js 版本**: 16.2.1
- **Payload CMS 版本**: 3.81.0
复现步骤
-
初始化项目
git clone <repository-url>
cd xiangfeng
pnpm install
-
启动开发服务器
-
访问页面
- 打开浏览器访问
http://localhost:3000
-
触发错误
- 页面加载时出现 500 错误
- 终端显示 SCSS 编译错误:
Error: Can't find stylesheet to import.
@import 'vars';
预期行为
页面正常加载,AdminBar 组件正确渲染。
实际行为
页面返回 500 错误,SCSS 编译失败。
截图
相关代码
// src/components/AdminBar/index.scss (问题文件)
@import '~@payloadcms/ui/scss';
.admin-bar {
@include small-break {
display: none;
}
}
Environment Info
Describe the Bug.
需要确认样式冲突问题,报错500
Reproduction Steps
Bug 复现步骤模板
环境信息
复现步骤
初始化项目
启动开发服务器
pnpm dev # 或 npm run dev访问页面
http://localhost:3000触发错误
预期行为
页面正常加载,AdminBar 组件正确渲染。
实际行为
页面返回 500 错误,SCSS 编译失败。
截图
相关代码
Environment Info