DianaIonita / serverless-api-gateway-caching

A plugin for the Serverless framework which helps with configuring caching for API Gateway endpoints.
ISC License
136 stars 35 forks source link

Serverless Offline error #119

Closed victorjkhalaf closed 1 year ago

victorjkhalaf commented 1 year ago

When running sls offline on Serverless v3.22 with Serverless Offline v10.1.0, I see the following error that gets fixed when I disable your plugin:

Error:
At least one of the plugins defines a validation schema that is invalid. Try disabling plugins one by one to identify the problematic plugin and report it to the plugin maintainers.

Unfortunately I don't know enough to debug what the fix would be. Would you happen to know if there is a compatibility issue with the latest versions of the framework and offline?

My package.json contains the following version definitions for serverless plugins

    "serverless-apigwy-binary": "^1.0.0",
    "serverless-api-cloudfront": "^0.9.5",
    "serverless-api-gateway-caching": "^1.9.0",
    "serverless-domain-manager":"^6.1.0",
    "serverless-offline":"^10.1.0",
DianaIonita commented 1 year ago

Hi @victorjkhalaf,

Please try disabling only the serverless-api-gateway-caching plugin, for example, by removing it from the plugins list in serverless.yml, then let me know if the issue is still happening.

Thanks

victorjkhalaf commented 1 year ago

Hi @DianaIonita I did, as I mentioned in my first sentence. Once I comment it out, sls-offline successfully runs. It also fails to run when doing sls deploy so this might also be a greater issue not related to the sls offline plugin. Let me know if I can provide further info.

DianaIonita commented 1 year ago

Hi @victorjkhalaf,

Apologies, I hadn't spotted that you did narrow down the problem to this plugin.

I tried reproducing the error by using these modules:

serverless@3.22.0
serverless-offline@10.1.0
serverless-api-gateway-caching@1.9.0

I ran sls offline and there were no issues. I also successfully ran sls deploy.

Could you please try removing node_modules and reinstalling everything? Maybe there's a previous version of something hanging around for no reason.

victorjkhalaf commented 1 year ago

Diana, it appears our issues has been resolved. It may have been related to a domain manager problem earlier and once that got resolved, the plugin successfully deployed alongside. Very sorry for troubling you. Our woes may have been while upgrading from SLS v2 to v3 and not paying enough attention to our yml settings affecting the custom domain manager plugin's yml changes. I'll close this.

Thanks for working with me and sorry again!