ghostToHugo icon indicating copy to clipboard operation
ghostToHugo copied to clipboard

go install fails on Linux

Open dmd opened this issue 1 year ago • 2 comments

dmd@dev …/ghostToHugo on  master via 🐹 v1.10.4
❯ go install
main.go:8:2: cannot find package "github.com/jbarone/ghostToHugo/ghosttohugo" in any of:
        /usr/lib/go-1.10/src/github.com/jbarone/ghostToHugo/ghosttohugo (from $GOROOT)
        /home/dmd/go/src/github.com/jbarone/ghostToHugo/ghosttohugo (from $GOPATH)
main.go:10:2: cannot find package "github.com/spf13/jwalterweatherman" in any of:
        /usr/lib/go-1.10/src/github.com/spf13/jwalterweatherman (from $GOROOT)
        /home/dmd/go/src/github.com/spf13/jwalterweatherman (from $GOPATH)
main.go:11:2: cannot find package "github.com/spf13/pflag" in any of:
        /usr/lib/go-1.10/src/github.com/spf13/pflag (from $GOROOT)
        /home/dmd/go/src/github.com/spf13/pflag (from $GOPATH)

dmd avatar Jul 22 '22 12:07 dmd

Thank you for your report. I'm traveling, and away from a computer I can test on. However, looking at the output, it looks like you are using an old version of go (1.10). I would recommend trying to update your version of go first. At least up to a version that supports go modules. I think the current version of ghostToHugo was written for go 1.15.

jbarone avatar Jul 22 '22 12:07 jbarone

Hi, i manged to install it with GO111MODULE=on go install github.com/jbarone/ghostToHugo@latest on Arch 6.4.12-zen1-1-zen but it is no longer working unfortunately. Any ideas?

/home/user/go/bin/ghostToHugo --hugo ~/Docs/ghost_to_hugo/test ~/Docs/ghost_to_hugo/ghost.json
Importing...
panic: interface conversion: interface {} is nil, not string

goroutine 1 [running]:
github.com/jbarone/ghostToHugo/ghosttohugo.cardBookmark({0x11cfac0?, 0xc000416cc0?})
	/home/user/go/pkg/mod/github.com/jbarone/[email protected]/ghosttohugo/card.go:77 +0xce6
github.com/jbarone/mobiledoc.(*Mobiledoc).renderCard(0xc0008c87d0?, 0xc0008baf28)
	/home/user/go/pkg/mod/github.com/jbarone/[email protected]/card.go:66 +0xc2
github.com/jbarone/mobiledoc.(*Mobiledoc).parseSectionCard(0xc0008bb680, 0xc0008c6460, {0xc000416fc0, 0x2, 0xc0008c91d8?})
	/home/user/go/pkg/mod/github.com/jbarone/[email protected]/parse_v03.go:122 +0xce
github.com/jbarone/mobiledoc.(*Mobiledoc).parseSection(0xc000816400?, 0x8bf?, {0xc000416fc0?, 0x2, 0x2})
	/home/user/go/pkg/mod/github.com/jbarone/[email protected]/parse_v03.go:154 +0x11a
github.com/jbarone/mobiledoc.(*Mobiledoc).parseV03(0xc0008bb680, 0x7?)
	/home/user/go/pkg/mod/github.com/jbarone/[email protected]/parse_v03.go:184 +0x27f
github.com/jbarone/mobiledoc.(*Mobiledoc).Render(0xc0008bb680, {0x1aa17a0, 0xc00083be60})
	/home/user/go/pkg/mod/github.com/jbarone/[email protected]/mobiledoc.go:87 +0x20b
github.com/jbarone/ghostToHugo/ghosttohugo.post.mobiledocMarkdown({{0xc0007360e0, 0x1a, 0x20}, {0xc00073e1c0, 0x34}, {0xc00073e200, 0x31}, {0x0, 0x0}, {0xc000814000, ...}, ...})
	/home/user/go/pkg/mod/github.com/jbarone/[email protected]/ghosttohugo/post.go:136 +0x6ce
github.com/jbarone/ghostToHugo/ghosttohugo.(*Converter).writePost(_, {{0xc0007360e0, 0x1a, 0x20}, {0xc00073e1c0, 0x34}, {0xc00073e200, 0x31}, {0x0, 0x0}, ...})
	/home/user/go/pkg/mod/github.com/jbarone/[email protected]/ghosttohugo/post.go:103 +0x3f8
github.com/jbarone/ghostToHugo/ghosttohugo.(*Converter).Convert(0xc0000ce820, {0x1aa5148?, 0xc0003ca060})
	/home/user/go/pkg/mod/github.com/jbarone/[email protected]/ghosttohugo/converter.go:166 +0x325
main.main()
	/home/user/go/pkg/mod/github.com/jbarone/[email protected]/main.go:91 +0x815

gustlik avatar Sep 07 '23 07:09 gustlik