Can't use serverless command v4

I have been using the Serverless Framework successfully for some time, and I’ve been able to execute any serverless command without issues. However, I encountered a problem when I attempted to deploy my code using serverless deploy. I received the following error:

Could not find a valid version to run.

This error occurs for every Serverless command I attempt to execute, including serverless -v, which also returns the same error. It’s puzzling that this issue arose suddenly, as everything was functioning perfectly before.

I have tried reinstalling the Serverless package, but the issue persists. Please help.

1 Like

I am having the same problem. No results on google. Guessing this is a very recently introduced issue.

The docs say:

As of version 4, the Serverless Framework automatically updates itself and performs a check to do so every 24 hours.

Wonder if something has gone wrong here?

1 Like

Yes, maybe something to do with that. Very annoying!

I’ll try downgrading the version?

When did you get the problem? @powerlanguage

Was working fine earlier. Maybe ~5 hours ago. Didn’t change anything and now getting the same error as you when I try and run commands.

If i run serverless update i do see it running for a moment before i get the Could not find a valid version to run. error.

I can’t track down where that error message is coming from though.

I just installed serverless version 3.39.0 and I am not getting that error anymore.

Nice. Do you know if the API is the same?

Well, straight away I found out that you can’t use ssm in variables in the serverless.yml. I think there are breaking changes. No typescript support out of the box! I will look in to it.

Good luck!

I am not blocked on this, so gonna wait and see if it fixes itself by tomorrow. Then will look at downgrading.

1 Like

Ok hopefully fixes tommorow, :saluting_face:

Also having this issue with serverless 4, looks like some update broke the whole thing

Having the same issue! Thank GOD this is not just a me thing… :sleepy:

Did everyone get it today?

I assume that it’ll apply to anyone using v4. I tried switching to an older version but it doesn’t have the same configuration packaging, which might also apply to others. (therefore alerting them of this bug)

Little update (on my behalf) as of right now, it’s working as expected. (V4)

Same here!! It’s working!

I am curious to hear from someone at Serverless what happened here. It sounds like maybe an outage of some kind? And that impacted our ability to run any serverless commands?

edit: discussion of the issue here: Error "Could not find a valid version to run" · Issue #12846 · serverless/serverless · GitHub