I am trying to test the serverless lambda function locally using the command Command
serverless invoke local -f send --log --stage test
Error
python3: can't open file '/snapshot/serverless/lib/plugins/aws/invokeLocal/invoke.py': [Errno 2] No such file or directory
This command is run inside the directory which has serverless.yml, requirements.txt, handler.py.
Unable to understand why this error occurs and what's the solution
I had the same error.
The result of my serverless --version
command is
Framework Core: 1.66.0 (standalone)
Plugin: 3.4.1
SDK: 2.3.0
Components: 2.22.3
First, if you installed with the command of curl -o- -L https://slss.io/install | bash
, uninstall it with the following command:
serverless uninstall
Next, install with the following command:
npm install -g [email protected]
npm bin serverless
Now the serverless --version
command looks like this:
1.43.0
that's all
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With