Build Error on PR Environment (lightningcss.linux-x64-gnu.node)

luthfi9251
PRO

2 days ago

Hi,

I’m encountering the following error when deploying a PR environment:

Error: Cannot find module '../lightningcss.linux-x64-gnu.node'

This only happens on the feature/admin branch. The fonts.ts file is exactly the same as in staging, and I’ve already merged the latest staging into feature/admin. I also tried changing the Node.js version, but the issue persists.

Everything works fine locally, and the staging branch builds without issues on Railway.

Could you help me investigate what might be causing this?

Thank you

Awaiting Railway Response$10 Bounty

6 Replies

Railway
BOT

2 days ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


2 days ago

This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.

Status changed to Open brody 2 days ago


fehmisener
HOBBY

2 days ago

Exact same problem here!


clashing
FREETop 1% Contributor

2 days ago

Can you try by changing the file name, and its references wherever they are?


fehmisener
HOBBY

2 days ago

Me again, I fixed the problem by removing the `package-lock.json`. I'm not really sure what caused the problem but it's fixed now


fehmisener

Me again, I fixed the problem by removing the `package-lock.json`. I'm not really sure what caused the problem but it's fixed now

luthfi9251
PRO

a day ago

Thanks a lot for the suggestion!

I tried deleting the package-lock.json, and surprisingly—it worked! I'm not sure if that's the solution, but it definitely triggered something different. Looking at the logs, the build process changed completely.

Before removing the lockfile, it seemed to be using some cached build. After deleting it, it looks like everything was rebuilt from scratch, which probably fixed the native module issue.

Really appreciate your help


luthfi9251

Thanks a lot for the suggestion!I tried deleting the package-lock.json, and surprisingly—it worked! I'm not sure if that's the solution, but it definitely triggered something different. Looking at the logs, the build process changed completely.Before removing the lockfile, it seemed to be using some cached build. After deleting it, it looks like everything was rebuilt from scratch, which probably fixed the native module issue.Really appreciate your help

fehmisener
HOBBY

a day ago

All good, i'm glad it's fixed but it's weird it happened to both of us the same time, maybe @railway team can dig for the issue.