I have just upgraded my project to v3 Serverless Framework and running the
serverless deploy command crashes every time, even on a brand new project with the
hello handler with no plugins etc.
I am running nvm (for running multiple NodeJs versions on Windows) and I wonder if it is connected to that. The issue is not with AWS, it seems that the actual code for SLS itself is erroring:
Environment: win32, node 14.18.1, framework 3.0.1, plugin 6.0.0, SDK 4.3.0 Docs: docs.serverless.com Support: forum.serverless.com Bugs: github.com/serverless/serverless/issues Error: TypeError: validate is not a function at ConfigSchemaHandler.validateConfig (C:\Users\MainPC\AppData\Roaming\nvm\v14.18.1\node_modules\serverless\lib\classes\config-schema-handler\index.js:101:5) at async Service.validate (C:\Users\MainPC\AppData\Roaming\nvm\v14.18.1\node_modules\serverless\lib\classes\service.js:267:5) at async Serverless.run (C:\Users\MainPC\AppData\Roaming\nvm\v14.18.1\node_modules\serverless\lib\serverless.js:162:28) at async C:\Users\MainPC\AppData\Roaming\nvm\v14.18.1\node_modules\serverless\scripts\serverless.js:675:9
I cannot find the issue elsewhere. It 100% is not related to plugins.
Update: so far I have tried uninstalling
nvm, uninstalling NodeJS, deleting everything in
C:\Users\MainPC\AppData\Roaming\npm and re-installing NodeJS v14 from scratch. I get the exact same error. Reverting to
v2.72.2 works fine.