Vercel Deployment Issue
Unanswered
Alias posted this in #help-forum
AliasOP
I am having trouble with my deployed app on Vercel. Everything works fine on localhost however on the deployed app available at players-nexus-deploy.vercel.app, the game info page (which the app redirects to after clicking on a game card) is stuck on loading and I am not sure why. I have attached the file where the page is located. I can confirm that the API routes area all correct and they are giving me the data that I want. The github repo is available at https://github.com/Ehsaan75/players_nexus. Would anyone be able to help tell me where the problem is coming from, and how to possibly solve it?
7 Replies
AliasOP
Bumping...
AliasOP
Bump
Vizsla
I would try setting a bunch of console logs in this file you linked
I'd be interested in calling
-
-
- Inside of
If you're saying it's working locally, it could be you need to set this API key environment variable in your Vercel deployment settings.
I'd be interested in calling
console.log for a few things-
gameData @ L54-
gameInfo after L49- Inside of
globalapi.tsx I'd want to see the value of this line const key = process.env.NEXT_PUBLIC_API_KEY;If you're saying it's working locally, it could be you need to set this API key environment variable in your Vercel deployment settings.
AliasOP
Yeah it all works locally, the API key is definitely in the environment variable as its needed to fetch the games for the home page
@Vizsla I would try setting a bunch of console logs in this file you linked
I'd be interested in calling `console.log` for a few things
- `gameData` @ L54
- `gameInfo` after L49
- Inside of `globalapi.tsx` I'd want to see the value of this line `const key = process.env.NEXT_PUBLIC_API_KEY;`
If you're saying it's working locally, it could be you need to set this API key environment variable in your Vercel deployment settings.
AliasOP
I have added the console.logs in, on localhost [Log] null
[Log] null
[Log] null
[Log] null (x2)
[Log] {id: 3498, slug: "grand-theft-auto-v", name: "Grand Theft Auto V", name_original: "Grand Theft Auto V", description: "<p>Rockstar Games went bigger, since their previou… a mantener a todos ocupados y comprometidos.</p>", …}
[Log] {id: 3498, slug: "grand-theft-auto-v", name: "Grand Theft Auto V", name_original: "Grand Theft Auto V", description: "<p>Rockstar Games went bigger, since their previou… a mantener a todos ocupados y comprometidos.</p>", …}
[Log] {id: 3498, slug: "grand-theft-auto-v", name: "Grand Theft Auto V", name_original: "Grand Theft Auto V", description: "<p>Rockstar Games went bigger, since their previou… a mantener a todos ocupados y comprometidos.</p>", …}
[Log] {id: 3498, slug: "grand-theft-auto-v", name: "Grand Theft Auto V", name_original: "Grand Theft Auto V", description: "<p>Rockstar Games went bigger, since their previou… a mantener a todos ocupados y comprometidos.</p>", …} it gives me this. Not sure why null is appearing 4 times. But as you can see the data comes through, on the deployed app, it is just giving me [Log] null ([slug]-ab35dbb769f882d8.js, line 1)
[Log] null ([slug]-ab35dbb769f882d8.js, line 1)
[Log] null ([slug]-ab35dbb769f882d8.js, line 1)
[Log] null ([slug]-ab35dbb769f882d8.js, line 1)
[Log] null
[Log] null
[Log] null (x2)
[Log] {id: 3498, slug: "grand-theft-auto-v", name: "Grand Theft Auto V", name_original: "Grand Theft Auto V", description: "<p>Rockstar Games went bigger, since their previou… a mantener a todos ocupados y comprometidos.</p>", …}
[Log] {id: 3498, slug: "grand-theft-auto-v", name: "Grand Theft Auto V", name_original: "Grand Theft Auto V", description: "<p>Rockstar Games went bigger, since their previou… a mantener a todos ocupados y comprometidos.</p>", …}
[Log] {id: 3498, slug: "grand-theft-auto-v", name: "Grand Theft Auto V", name_original: "Grand Theft Auto V", description: "<p>Rockstar Games went bigger, since their previou… a mantener a todos ocupados y comprometidos.</p>", …}
[Log] {id: 3498, slug: "grand-theft-auto-v", name: "Grand Theft Auto V", name_original: "Grand Theft Auto V", description: "<p>Rockstar Games went bigger, since their previou… a mantener a todos ocupados y comprometidos.</p>", …} it gives me this. Not sure why null is appearing 4 times. But as you can see the data comes through, on the deployed app, it is just giving me [Log] null ([slug]-ab35dbb769f882d8.js, line 1)
[Log] null ([slug]-ab35dbb769f882d8.js, line 1)
[Log] null ([slug]-ab35dbb769f882d8.js, line 1)
[Log] null ([slug]-ab35dbb769f882d8.js, line 1)
Its just giving null
AliasOP
Bumping