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

stu_beezyPRO

10 months 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

10 months 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_beezyPRO

10 months ago

Sure thing: here they are


10 months 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_beezyPRO

10 months ago

v18.20.2


shubh675TRIAL

10 months ago

have you found any fix for this ?


stu_beezyPRO

10 months 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[bot] 10 months ago


10 months ago

Awesome, glad you where able to solve it!


Status changed to Awaiting User Response railway[bot] 10 months ago


Status changed to Solved brody 10 months ago