2 warnings found use --debug to expand UndefinedVar
kiarafbickers
PROOP

2 years ago

I'm encountering an issue while trying to build my project, in production on Railway.app.

The build process generates the following warnings:
2 warnings found use --debug to expand UndefinedVar
Despite following standard troubleshooting steps, including updating dependencies, ensuring all environment variables are set correctly, and verifying the Dockerfile configuration, the issue persists.

Here are the steps I have taken so far:
Checked and set all required environment variables.

Thanks for your help!

ⓘ Deployment information is only viewable by project members and Railway employees.

Solved

9 Replies

2 years ago

That would be just a warning and I have not seen it cause anyone problems, your issue is likely printed somewhere else in the logs, so please attach your full build logs - https://bookmarklets.up.railway.app/log-downloader/


kiarafbickers
PROOP

2 years ago

I've got them here.

Attachments


Status changed to Awaiting Railway Response Railway over 1 year ago


2 years ago

As per your build logs, looks like you have some coding errors -

You're importing a component that needs useRouter. It only works in a Client Component but none of its parents are marked with "use client", so they're Server Components by default.

Review your build logs to see more information on this error and the other error, fix them and try the build again.


kiarafbickers
PROOP

2 years ago

Yes, I have since fixed those issues and added a nixpacks.toml but I'm still seeing the docker image fail to get created.

Attachments


2 years ago

Seems your nixpacks.toml did more harm than good -

╔════════ Nixpacks v1.24.0 ═══════╗
║ setup      │ nodejs_22, npm-9_x ║
║─────────────────────────────────║
║ start      │ npm run start      ║
║─────────────────────────────────║
║ install    │ npm ci --omit=dev  ║
║─────────────────────────────────║
║ build      │ npm run build      ║
║─────────────────────────────────║
║ start      │ npm run start      ║
╚═════════════════════════════════╝

Please remove it and try another build.


kiarafbickers
PROOP

2 years ago

Removed. With similar errors on the next build.

Attachments


2 years ago

Per your build logs -

Error: The key NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY is not defined

Set that variable in your service settings and try again.


kiarafbickers
PROOP

2 years ago

Thank you much! That fixed it.


2 years ago

No problem!


Status changed to Solved brody over 1 year ago


Loading...