Next.js Discord

Discord Forum

Error: Module parse failed: Unexpected character '@' (1:0) > @tailwind base; | @tailwind component

Unanswered
Felix posted this in #help-forum
Open in Discord
I just created a new Next.js project with npx create-next-app when i try to start the project out of the box im getting following error:

Module parse failed: Unexpected character '@' (1:0)
&913086567042674719 base;
| &913086567042674719 components;
| &913086567042674719 utilities;

Import trace for requested module:
./src/app/globals.css
./src/app/layout.tsx
GET / 500 in 3835ms
When im doing the same installation without tailwindcss it still produces an error at (1:0) in the global.css file so I dont think the problem occurs because of tailwindcss.

When I'm creating the project in a GitHub Codespace it works without any problems. I already tried to uninstall and reinstall node.js on my computer but the error still occurs.

What could I try to solve this?

0 Replies