netlify / netlifyctl

MIT License
176 stars 34 forks source link

Most commands fail #77

Closed dracos closed 6 years ago

dracos commented 6 years ago

Listing sites works, but deploy etc all give:

$ netlifyctl deploy
panic: interface conversion: interface {} is nil, not *porcelain.Netlify

goroutine 1 [running]:
github.com/netlify/netlifyctl/context.GetClient(0x11a4300, 0xc420014058, 0xc420014058)
    /home/david/src/github.com/netlify/netlifyctl/context/context.go:30 +0x88
github.com/netlify/netlifyctl/operations.ChooseOrCreateSite(0x7f841e4f8528, 0xc420014058, 0xc4204d5680, 0x0, 0x0, 0xc4203beb88)
    /home/david/src/github.com/netlify/netlifyctl/operations/site.go:69 +0xc5
github.com/netlify/netlifyctl/commands/middleware.SiteConfigMiddleware.func1(0x7f841e4f8528, 0xc420014058, 0xc4204d5680, 0x121efa0, 0x0, 0x0, 0xcf5e2e, 0x4)
    /home/david/src/github.com/netlify/netlifyctl/commands/middleware/middleware.go:200 +0x2b4
github.com/netlify/netlifyctl/commands/middleware.NewRunFunc.func1(0xc4204d5680, 0x121efa0, 0x0, 0x0, 0x0, 0x0)
    /home/david/src/github.com/netlify/netlifyctl/commands/middleware/middleware.go:52 +0xf2
github.com/netlify/netlifyctl/vendor/github.com/spf13/cobra.(*Command).execute(0xc4204d5680, 0x121efa0, 0x0, 0x0, 0xc4204d5680, 0x121efa0)
    /home/david/src/github.com/netlify/netlifyctl/vendor/github.com/spf13/cobra/command.go:644 +0x3e8
github.com/netlify/netlifyctl/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x11ef9e0, 0x121ec1c, 0xcf56fa, 0x3)
    /home/david/src/github.com/netlify/netlifyctl/vendor/github.com/spf13/cobra/command.go:734 +0x2fe
github.com/netlify/netlifyctl/commands.Execute()
    /home/david/src/github.com/netlify/netlifyctl/commands/netlify.go:41 +0x2a5
main.main()
    /home/david/src/github.com/netlify/netlifyctl/main.go:16 +0x79

0.2.2 works. (Sorry for abruptness, late here!)

calavera commented 6 years ago

I'm looking into it 😔

calavera commented 6 years ago

can you tell us which version you're using and your OS?

did you run netlifyctl login before trying to deploy? I have the feeling that the problem is that it's not configuring your client properly.

this is my output with 0.3.0 on linux:

➜  go-lambda-on-netlify git:(test) ✗ netlifyctl deploy
Counting objects: 2 total objects  ✔
Resolving deltas: 1 objects to upload  ✔
Uploading objects: 1/1 done  ✔
Deploy done  🌎
    https://happy-borg-f26e76.netlify.com
➜  go-lambda-on-netlify git:(test) ✗ netlifyctl v      
Version: 0.3.0
Git SHA: a213b58b8bedf585181076becc4ba2c8dba38180
calavera commented 6 years ago

I think I found a way to reproduce it

calavera commented 6 years ago

I've released 0.3.1 with a patch for this issue:

https://github.com/netlify/netlifyctl/releases/tag/v0.3.1

Thanks a lot for reporting it 🙌