Handler PathError on Windows
hexadecy opened this issue · comments
Michel Couillard commented
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
- On a Windows machine with CMD or Powershell
sls deploy
- 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"