Skip to content

Bug : Can't find stylesheet to import when creating website template with mongodb #16037

@Nikhileshrana

Description

@Nikhileshrana

Describe the Bug

Error evaluating Node.js code
./src/components/AdminBar/index.scss
Error evaluating Node.js code
Error: Can't find stylesheet to import.

1 │ @import 'vars';
│ ^^^^^^

node_modules.pnpm@payloadcms+ui@3.80.0_@types+react@19.2.14_monaco-editor@0.55.1_next@16.2.0_@babel+core@7.29.zbl4ibmzq7tt6rg65msi5h4z7u\node_modules@payloadcms\ui\dist\scss\styles.scss 1:9 @import
src\components\AdminBar\index.scss 1:9 root stylesheet
(from D:\my-project\node_modules.pnpm\next@16.2.0
@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4_sass@1.77.4\node_modules\next\dist\build\webpack\loaders\resolve-url-loader\index.js, D:\my-project\node_modules.pnpm\next@16.2.0_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4_sass@1.77.4\node_modules\next\dist\compiled\sass-loader\cjs.js)
Caused by: Error: Can't find stylesheet to import.

1 │ @import 'vars';
│ ^^^^^^

node_modules.pnpm@payloadcms+ui@3.80.0_@types+react@19.2.14_monaco-editor@0.55.1_next@16.2.0_@babel+core@7.29._zbl4ibmzq7tt6rg65msi5h4z7u\node_modules@payloadcms\ui\dist\scss\styles.scss 1:9 @import
src\components\AdminBar\index.sc

Link to the code that reproduces this issue

test

Reproduction Steps

Forked -> Created a new template for website with mongodb. pnpm run dev error appears.

Which area(s) are affected?

area: templates

Environment Info

Error evaluating Node.js code
./src/components/AdminBar/index.scss
Error evaluating Node.js code
Error: Can't find stylesheet to import.
╷
1 │ @import 'vars';
│ ^^^^^^
╵
node_modules\.pnpm\@payloadcms+ui@3.80.0_@types+react@19.2.14_monaco-editor@0.55.1_next@16.2.0_@babel+core@7.29._zbl4ibmzq7tt6rg65msi5h4z7u\node_modules\@payloadcms\ui\dist\scss\styles.scss 1:9 @import
src\components\AdminBar\index.scss 1:9 root stylesheet
(from D:\my-project\node_modules\.pnpm\next@16.2.0_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4_sass@1.77.4\node_modules\next\dist\build\webpack\loaders\resolve-url-loader\index.js, D:\my-project\node_modules\.pnpm\next@16.2.0_@babel+core@7.29.0_@playwright+test@1.58.2_react-dom@19.2.4_react@19.2.4__react@19.2.4_sass@1.77.4\node_modules\next\dist\compiled\sass-loader\cjs.js)
Caused by: Error: Can't find stylesheet to import.
╷
1 │ @import 'vars';
│ ^^^^^^
╵
node_modules\.pnpm\@payloadcms+ui@3.80.0_@types+react@19.2.14_monaco-editor@0.55.1_next@16.2.0_@babel+core@7.29._zbl4ibmzq7tt6rg65msi5h4z7u\node_modules\@payloadcms\ui\dist\scss\styles.scss 1:9 @import
src\components\AdminBar\index.sc

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions