Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Docs to Specify Version (or Range) for serverless #34

Open
alexandermichels opened this issue Jul 11, 2024 · 3 comments
Open

Update Docs to Specify Version (or Range) for serverless #34

alexandermichels opened this issue Jul 11, 2024 · 3 comments

Comments

@alexandermichels
Copy link

When reproducing the steps to deploy the app, I ran into the following error while running "sls deploy":

✖ The Serverless version (4.1.12) does not satisfy the "frameworkVersion" (3) in serverless.yml
ServerlessError2: The Serverless version (4.1.12) does not satisfy the "frameworkVersion" (3) in serverless.yml
    at Service.loadServiceFileParam (file:///home/dijkstra/.serverless/releases/4.1.12/package/dist/sf-core.js:855:9321)
    at Service.load (file:///home/dijkstra/.serverless/releases/4.1.12/package/dist/sf-core.js:855:6963)
    at Serverless.init (file:///home/dijkstra/.serverless/releases/4.1.12/package/dist/sf-core.js:861:9726)
    at runFramework (file:///home/dijkstra/.serverless/releases/4.1.12/package/dist/sf-core.js:909:897)
    at async route (file:///home/dijkstra/.serverless/releases/4.1.12/package/dist/sf-core.js:920:16046)
    at async Object.run2 [as run] (file:///home/dijkstra/.serverless/releases/4.1.12/package/dist/sf-core.js:920:16444)
    at async run3 (file:///home/dijkstra/.serverless/releases/4.1.12/package/dist/sf-core.js:920:17704)

As the error implies, uninstalling serverless and installing a 3.* version solved the problem (in my case npm install -g [email protected]). I don't know enough about serverless to know if any 3.* works though.

@pengyin-shan
Copy link
Collaborator

@alexandermichels : my Serverless is on 3 as below:
Screenshot 2024-07-11 at 1 39 27 PM

And in Serverless.yml, we have

# You can pin your service to only deploy with a specific Serverless version
# Check out our docs for more details
frameworkVersion: '3'

So far, version 3 works well. I think after I finish the last deployment, Serverless will probably upgrade its version. You can continue with version 3 since it has proven to work fine. We can consider upgrading the Serverless version in the future if needed.

@alexandermichels
Copy link
Author

I'm not requesting an upgrade of the version, just asking to specify the version in Step 1 here: https://github.com/healthyregions/spatial-access?tab=readme-ov-file#deploy-backend-with-serverless to make the workflow easier to reproduce.

@pengyin-shan
Copy link
Collaborator

Oh I see, yes please go head with version 3 then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants