https://i.sstatic.net/JBscR.png I'm encountering an error and struggling to determine if I'm properly importing styles and using components correctly. Can someone guide me in the right direction?
Cloning github.com/branexists/nextjs (Branch: main, Commit: 30c148b)
Cloned successfully: 1.626s
Build cache restored
Running "vercel build"
Vercel CLI 28.4.14
Installing dependencies...
up to date in 498ms
80 packages are looking for funding
run `npm fund` for details
Detected Next.js version: 13.0.2
Detected `package-lock.json` generated by npm 7+...
Running "npm run build"
> <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="deb0bba6aab4ad9eeef0eff0ee">[email protected]</a> build
> next build
info - Linting and checking validity of types...
info - Creating an optimized production build...
(node:318) [DEP_WEBPACK_MODULE_ISSUER] DeprecationWarning: Module.issuer: Use new ModuleGraph API
(Use `node --trace-deprecation ...` to show where the warning was created)
Failed to compile.
./styles/hero.css
Global CSS cannot be imported from files other than your Custom <App>. Due to the Global nature of stylesheets, and to avoid conflicts, Please move all first-party global CSS imports to pages/_app.js. Or convert the import to Component-Level CSS (CSS Modules).
Read more: https://nextjs.org/docs/messages/css-global
Location: comps/Hero.js
Import trace for requested module:
./styles/hero.css
./comps/Hero.js
./styles/hero.css
Module build failed: Error: Final loader (./node_modules/next/dist/build/webpack/loaders/error-loader.js) didn't return a Buffer or String
at processResult (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:28:395049)
at /vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:28:396519
at /vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:1:283578
at iterateNormalLoaders (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:1:280385)
at iterateNormalLoaders (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:1:280470)
at /vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:1:280699
at runSyncOrAsync (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:1:279045)
at iterateNormalLoaders (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:1:280602)
at /vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:1:280244
at /vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:28:395994
Import trace for requested module:
./styles/hero.css
./comps/Hero.js
> Build failed because of webpack errors
Error: Command "npm run build" exited with 1
`
I attempted to adjust my import syntax from import styles to just import following advice from a previous question that multiple style imports were not allowed.