I was following along the installation process listed on the marketplace for Next.js blog demo
and on “Run your project locally” I received this error
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info - Loaded env from C:\folder\.env
info - Using webpack 5. Reason: Enabled by default https://nextjs.org/docs/messages/webpack5
(node:14496) [DEP_WEBPACK_MODULE_ISSUER] DeprecationWarning: Module.issuer: Use new ModuleGraph API
(Use `node --trace-deprecation ...` to show where the warning was created)
error - ./styles/index.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: pages\_app.js
I was able to resolve it for me by doing what is stated in the Tailwind guide:
// pages/_app.js
- import '../styles/globals.css'
+ import 'tailwindcss/tailwind.css'
I did not do any changes whatsoever other than what is listed in the guide, that’s why I thought of sharing this. Thanks