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
6 Replies
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
2 days ago
Can you try by changing the file name, and its references wherever they are?
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
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
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.