Connect to the product gadget app

I configured the gadget app in my next.js project. I used this cmd. npm install @gadget-client/origami it was working well for development. but I need to connect to the production. it is auto connected to the development. how can I connected to the production?
18 Replies
Chocci_Milk
Chocci_Milk•2w ago
Hello, I think that's cause you're using the development client. You should update the package using: yarn add @gadget/client@latest-production and use that one in production.
luc@s
luc@sOP•2w ago
you mean I need to use @gadget/client@latest-production instead of @gadget-client/origami don't need to add app name? /origami
Chocci_Milk
Chocci_Milk•2w ago
No, you need to install the latest production version of the package
luc@s
luc@sOP•2w ago
import { OrigamiClient } from "@gadget-client/origami"; export const gadgetClient = new OrigamiClient({ authenticationMode: { apiKey: process.env.GADGET_API_KEY, }, }); this is my current code
luc@s
luc@sOP•2w ago
I installed the production like this and used production api key. but still I have this error
No description
No description
No description
Chocci_Milk
Chocci_Milk•2w ago
Could you please share an image of the full version set in the package.json?
luc@s
luc@sOP•2w ago
No description
luc@s
luc@sOP•2w ago
before
No description
Chocci_Milk
Chocci_Milk•2w ago
In the request you're trying to hit development. Try adding the environment option (set to "production") in the client instance settings: https://docs.gadget.dev/api/example-app/development/external-api-calls/installing#connecting-to-a-specific-environment
luc@s
luc@sOP•2w ago
COOL šŸ‘ THanks so much Sir šŸ™
luc@s
luc@sOP•2w ago
Could you help me one more? do you have experience in Embedded app checks?
No description
luc@s
luc@sOP•2w ago
if possible, I can make new thread šŸ™
Chocci_Milk
Chocci_Milk•2w ago
Yes, please make a new thread
luc@s
luc@sOP•2w ago
Good
Chocci_Milk
Chocci_Milk•2w ago
I'm going to close this thread if this is resolved
luc@s
luc@sOP•2w ago
Of course.
Gizmo
Gizmo•2w ago
Do you like this answer? ​

Did you find this page helpful?