4

After I signed in in my serverless account and then I tried to deploy my application (on Amazon), it shows me this error

    Error: `docker run --rm -v C:/Users/user/AppData/Local/UnitedIncome/serverless-python-requirements/Cache/3c5307946d60c3cf6dcd718de08a5ac453454387e6a435435edf993f360200a547cc_x86_64_slspyc:/var/task:z -v C:/Users/user/AppDa
ta/Local/UnitedIncome/serverless-python-requirements/Cache/downloadCacheslspyc:/var/useDownloadCache:z -u 0 lambci/lambda:build-python3.8 python -m pip install -t /var/task/ -r /var/task/requirements.txt --cache-dir /var/useDownload
Cache` Exited with code 1
      at ChildProcess.<anonymous> (C:\Users\user\Desktop\voice-reckognition\node_modules\child-process-ext\spawn.js:38:8)
      at ChildProcess.emit (node:events:390:28)
      at ChildProcess.emit (node:domain:475:12)
      at ChildProcess.cp.emit (C:\Users\user\Desktop\voice-reckognition\node_modules\cross-spawn\lib\enoent.js:34:29)
      at maybeClose (node:internal/child_process:1064:16)
      at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)

My application is with python and I have installed serverless-python-requirements and it is my package.json like this:

"devDependencies": {
    "serverless-python-requirements": "^5.3.0"
  }

Also in my serverless.yml, I have those:

plugins:
  - serverless-python-requirements


custom:
  pythonRequirements:
    dockerizePip: non-linux

How to solve this one?

3 Answers 3

2

The error message says docker run failed: Exited with code 1 -- were there more error message printed?

Make sure that docker is working on your system. I needed to reboot after installing docker (I think there was a permission problem with the SSH session that was running before change to docker group was made), and then the next serverless deploy worked without a problem.

Sign up to request clarification or add additional context in comments.

Comments

1

If you are using serverless framework to deploy ,based on the documentation when you want to install the serverless-python-requirements you have to use this line on the terminal first serverless plugin install -n serverless-python-requirements. This will automatically add the plugin to your project's package.json and the plugins section of it's serverless.yml. You do not have to do this manually as you can make any mistake in the process.

1 Comment

The error messages showing docker run means serverless-python-requirements was already installed used being used.
1

I've run into this error countless times, and it's always because docker isn't running on my system when I try to deploy. Error message is not terribly direct about that one.

1 Comment

(facepalm) - got me too

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.