client regeneration not including new global actions

I added a few new global actions, and no mateter how many times I regenrerate the react client, it won't allow me to call the new global actions, only ones proir to today!
No description
51 Replies
Chocci_Milk
Chocci_Milk7mo ago
From where are you seeing this? Is this in the external application that you were talking about?
Jay
JayOP7mo ago
Yes
Chocci_Milk
Chocci_Milk7mo ago
What do you mean by you've regenerated the client in that case?
Jay
JayOP7mo ago
I added the action, reran the npm install, It should’ve allowed me to useGlobalAction
Chocci_Milk
Chocci_Milk7mo ago
What command specifically?
Jay
JayOP7mo ago
The one on the docs Just a moment npm install @gadget-client/app-handle @gadgetinc/react
Jay
JayOP7mo ago
And https://docs.gadget.dev/api/brightpearl/development/external-api-calls/installing#updating-the-npm-package DM’d you the app name Pinging this Worked in my laptop when I got home. Not sure what was different back to the other computer from yesterdya, not updating. I added a global action, and the client in the package.json stays ": "^1.103.0-development.22752", even though in the sync.json file it says
"environment": "development",
"environments": {
"development": {
"filesVersion": "24319"
}
}
"environment": "development",
"environments": {
"development": {
"filesVersion": "24319"
}
}
and the action is showing when i log the api
Chocci_Milk
Chocci_Milk7mo ago
Could you please try running yarn upgrade?
Jay
JayOP7mo ago
im using npm oh you mean in gadget?
Chocci_Milk
Chocci_Milk7mo ago
No, I mean in the external app
Jay
JayOP7mo ago
so run yarn update even if im using npm?
Chocci_Milk
Chocci_Milk7mo ago
No, you have to use the equivalent command to yarn upgrade in npm
Jay
JayOP7mo ago
ran npm update and it still shows : "^1.103.0-development.22763",
Chocci_Milk
Chocci_Milk7mo ago
Ok, so you should have the latest version of your package. Is it working now?
Jay
JayOP7mo ago
nope how do I know what version is the latest? in the sync file? This is really frustrating tbh
Chocci_Milk
Chocci_Milk7mo ago
Could you please share the code file with me?
Jay
JayOP7mo ago
the package.json? or sync?
Chocci_Milk
Chocci_Milk7mo ago
Your external frontend with the client instantiation
Jay
JayOP7mo ago
import { Client } from '@gadget-client/bulk-orders';

const api = new Client({
authenticationMode: { browserSession: true },
});

// log the api
console.log('api', api);

export { api };
import { Client } from '@gadget-client/bulk-orders';

const api = new Client({
authenticationMode: { browserSession: true },
});

// log the api
console.log('api', api);

export { api };
Chocci_Milk
Chocci_Milk7mo ago
And you're trying to hit which env?
Jay
JayOP7mo ago
in dev - dev, and in pro -prod
Chocci_Milk
Chocci_Milk7mo ago
I've been getting errors when trying to install your package to test on my end I think I know why GIve me a second
Jay
JayOP7mo ago
aha ok
Chocci_Milk
Chocci_Milk7mo ago
Yeah, I wasn't pointing to the registry This is the version that I see for your package: "@gadget-client/bulk-orders": "^1.107.0-development.22980",
Jay
JayOP7mo ago
not sure what that means, but how do i fix it?
Chocci_Milk
Chocci_Milk7mo ago
It means that you're using a completely outdated version
Jay
JayOP7mo ago
how come it wasn't updating when i ran the command?
Chocci_Milk
Chocci_Milk7mo ago
You should delete your node modules and run yarn (or npm) add @gadget-client/bulk-orders
Jay
JayOP7mo ago
i tried that
Chocci_Milk
Chocci_Milk7mo ago
I don't know. Probably something to do with how npm manages deps
Jay
JayOP7mo ago
it kept reinstalling the same one
Chocci_Milk
Chocci_Milk7mo ago
Try switching to yarn then
Jay
JayOP7mo ago
that worked!
Chocci_Milk
Chocci_Milk7mo ago
Yeah, yarn and pnpm are vastly superior to npm
Jay
JayOP7mo ago
well actually it installed "@gadget-client/bulk-orders": "^1.107.0-development.23006",
Chocci_Milk
Chocci_Milk7mo ago
Had you made some changes to the backend in any way?
Jay
JayOP7mo ago
should i?
Chocci_Milk
Chocci_Milk7mo ago
No, I ask because there was a version change
Jay
JayOP7mo ago
where is the version from? is it visisble in vs code?
Chocci_Milk
Chocci_Milk7mo ago
Nvm, it doesn't matter
Jay
JayOP7mo ago
so end of the day, how do i get it ot have the latest package?
Chocci_Milk
Chocci_Milk7mo ago
You should already have the latest package
Jay
JayOP7mo ago
OK so I created a new global action, gave it unathenticated permissions, and reinstalled the client, and it isn't showing up in the api processSheetUploadNew
ljspoor94
ljspoor947mo ago
Trying to dig it out but I remember having this issue, can't remember exactly what caused it but I remember Harry looking into it and was quite a big reasoning for it IIRC (I worry it was in the old channel setup we had which I can no longer access)
Chocci_Milk
Chocci_Milk7mo ago
Could you please try again? Honestly, might not be a bad idea to completely remove the package reset node modules and readd
Jay
JayOP7mo ago
didnt' help
Chocci_Milk
Chocci_Milk7mo ago
Ok, can you please share your package.json?
Jay
JayOP6mo ago
This is really holding back i thought the react client was a blessing 🙂 it is getting worse now a param that was oiringall on the action isn't even being read did this multiple times it feel liek there are two clinets installed and are contracdicting each other wow. I had to delete the node modules, kill the terminal and restart! is that all it was??
Chocci_Milk
Chocci_Milk6mo ago
Definitely possible
Jay
JayOP6mo ago
was your issue that you didn't restart the local server? I would suggest this to be added to the regeneration docs

Did you find this page helpful?