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

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

Solved$10 Bounty

Pinned Solution

fehmisener
FREE

7 months 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 slightly_smiling_face emoji

6 Replies

Railway
BOT

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


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


fehmisener
FREE

7 months ago

Exact same problem here!


clashing
HOBBY

7 months ago

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


fehmisener
FREE

7 months 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 slightly_smiling_face emoji


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
PROOP

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

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


Status changed to Solved chandrika 7 months ago


Loading...