Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fresh google-go project fails to deploy #5980

Open
eliaperantoni opened this issue Mar 30, 2019 · 2 comments
Open

Fresh google-go project fails to deploy #5980

eliaperantoni opened this issue Mar 30, 2019 · 2 comments

Comments

@eliaperantoni
Copy link

This is a Bug Report

Description

I was just trying out the Serverless Framework with the google-go template

serverless create --template google-go --path painless
serverless plugin install --name "serverless-google-cloudfunctions"
serverless deploy

but I'm getting this error

elia@elia-mint:~/Documenti/painless$ serverless deploy
Serverless: Packaging service...
Serverless: Excluding development dependencies...
Serverless: Compiling function "first"...
Serverless: Uploading artifacts...
Serverless: Artifacts successfully uploaded...
Serverless: Updating deployment...
Serverless: Checking deployment update progress...
..... 
  Error --------------------------------------------------
 
  Deployment failed: RESOURCE_ERROR

     {"ResourceType":"cloudfunctions.v1beta2.function","ResourceErrorCode":"400","ResourceErrorMessage":"Build failed: # serverlessapp\n/tmp/sgb/gopath/src/serverlessapp/worker.go:48:28: cannot refer to unexported name hello.http\n/tmp/sgb/gopath/src/serverlessapp/worker.go:48:28: undefined: hello.http\n/tmp/sgb/gopath/src/serverlessapp/worker.go:173:29: cannot refer to unexported name hello.http\n/tmp/sgb/gopath/src/serverlessapp/worker.go:173:29: undefined: hello.http\n"}
 
     For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
 
  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Issues:        forum.serverless.com
 
  Your Environment Information ---------------------------
     OS:                     linux
     Node Version:           11.13.0
     Serverless Version:     1.40.0
 
elia@elia-mint:~/Documenti/painless$

Additional Data

  • Serverless Framework Version you're using:
    1.40.0
  • Operating System:
    Linux Mint 19.1 x64
  • Provider Error messages:
Implementation error:
Build failed: # serverlessapp
/tmp/sgb/gopath/src/serverlessapp/worker.go:48:28: cannot refer to unexported name hello.http
/tmp/sgb/gopath/src/serverlessapp/worker.go:48:28: undefined: hello.http
/tmp/sgb/gopath/src/serverlessapp/worker.go:173:29: cannot refer to unexported name hello.http
/tmp/sgb/gopath/src/serverlessapp/worker.go:173:29: undefined: hello.http
@dca
Copy link

dca commented Apr 11, 2019

have the same problem

@ironmike-au
Copy link

If it helps anyone else I was able to get around this by using an upper-case "H" in the function name in serverless.yml:

functions:
  first:
    handler: Hello
    events:
      - http: path

But then of course my function is now published with an uppercase Hello which isn't ideal and there's limited docs to try and point me to my next move

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants