Deploy doesn't seem to pick up newest package.json changes

Issues information

Your issue

I have recently changed package.json to account for production environment, changing it to run using forever package.

That in itself doesn’t seem to work well with Qovery (as I suppose the deploy picks it up as not successful?), but that wouldn’t be a problem as I don’t mind running it with just regular node command for Qovery.

But then when I changed it back to have an initial npm start script (not using forever), the deploy doesn’t seem to be able to pick up the latest changes to the package.json file. Any way to force that to happen?

Thank you

Hello,

you can use the api to force a deploy on a specific commit: [BETA] Qovery API.

So if you use the last commit of your main branch, it should take all the changes you’ve made.

Thanks, Enzo, I will try that. I am assuming that this endpoint is different from pushing a new commit somehow so that it will take up all latest changes where the CI doesn’t account for package.json somehow? :thinking:

Also, how do I auth with the API, it says JWTs, but I couldn’t find any login endpoints and if I try to use the JWT I get from being authenticated in the control panel it still throws 401.

When you push it triggers a deployment with the last commit pushed but if something failed somehow you stay stuck with a previous one. Another solution would be to push a new commit.

If you have Qovery’s CLI installed, if you use the command qovery auth, it will generate and stored a jwt in .qovery/access_token.

Still not having luck with it

I am including the results of code ~/.qovery/access_token after running qovery auth

The body of my request has:

{
    "git_commit_id": "a0b3d3291c627731a75662cb7c32a5c6974925d1"
}

Ok, I figured it out. For some reason ~/.qovery/access_token value was not correct one, but the ~/.qovery/context.json has the correct values.

Thanks for your help, @Enzo!

Ok so drama is not over unfortunately :expressionless:

While the build re-trigger did work, I am still having an issue with it picking up wrong package.json for some reason:

My package.json is at 0.1.3 version in the repo, but it seems like it still sees it as 0.0.1.

That’s strange, I have to investigate more.

It’s fixed and working on my side. Can you confirm ?

It’s up now! Thank you so much.
Can you share what was the issue? Is there anything I can do next time to unstuck it?

It was a bug on our side. Commit was catch with good package.json version but was deploying the old one.

I have to dig to find why it happens.

Thanks for explanation! Thanks again for your help :pray:

1 Like