Module Parse Failed: Unexpected character '@' Error with Node NextJs Project
stu_beezy
PROOP

2 years ago

I currently have a typescript,nextJs,react project set up that two days ago was rendering pages successfully. However, when redeploying the project today (with no new code changes) the project now returns this error when trying to load a page:

⨯ ./src/styles/globals.css

Module parse failed: Unexpected character '@' (1:0)

> @import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap';);

@tailwind base;

@tailwind components;

Import trace for requested moduel:

./src/styles/global.css

./src/app/layout.tsx

Has something changed with the deploy process recently? I'm not sure what the issue is.

For added context I already have tailwind, postcss, autoprefixer set up and can confirm that the application works for me locally

Solved

7 Replies

brody
EMPLOYEE

2 years ago

Can you attach the build logs for the build that worked and the build that isnt working? - https://bookmarklets.up.railway.app/log-downloader/


stu_beezy
PROOP

2 years ago

Sure thing: here they are


brody
EMPLOYEE

2 years ago

Both of those build logs use the same nixpacks and node versions, so this wasn't caused by a change on Railway's side of things.

What version of node do you use locally for this project?


stu_beezy
PROOP

2 years ago

v18.20.2


shubh675
TRIAL

2 years ago

have you found any fix for this ?


stu_beezy
PROOP

2 years ago

I ended up having to create a custom dockerfile that builds the app and then follow their docs here for having the project point to it.


Status changed to Awaiting Railway Response Railway over 1 year ago


brody
EMPLOYEE

2 years ago

Awesome, glad you where able to solve it!


Status changed to Awaiting User Response Railway over 1 year ago


Status changed to Solved brody over 1 year ago


Loading...