mthenw / serverless-go-plugin

⚡️ Serverless Framework plugin that compiles Go functions on the fly. Sponsored by https://cloudash.dev

Home Page:https://cloudash.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Handler PathError on Windows

hexadecy opened this issue · comments

Expected Behavior

That we can deploy on Windows the exact same Go Serverless project that Mac and Linux users work on.

Current Behavior on Windows

{
  "errorMessage": "fork/exec /var/task/.bin\\helloWorld: no such file or directory",
  "errorType": "PathError"
}

Current workaround

  • Change the handler path on AWS from .bin\helloWorld to .bin/helloWorld
  • Then save

Steps to Reproduce

  1. On a Windows machine with CMD or Powershell
  2. sls deploy
  3. Test or run the lambda with the AWS Hello Word template

Context (Environment)

  • go 1.13.8 windows/amd64
  • serverless-go-plugin: 2.0.0
  • Default serverless-go-plugin config, no custom
  • command line (cmd) and Powershell (5.1.19041.1)
helloWorld:
  handler: hello-world/main.go

Possible Solution

  • Correct the handler path when process.platform === "win32"