gscript icon indicating copy to clipboard operation
gscript copied to clipboard

could not find the genesis package in your go path

Open ahhh opened this issue 3 years ago • 1 comments

If you are experiencing an error like the following:

(db㉿Hel)-[~/…/gen0cide/gscript/cmd/gscript]
└─$ ./gscript 
panic: could not find the genesis package in your go path

goroutine 1 [running]:
github.com/gen0cide/gscript/compiler/computil.DefaultOptions()
        /home/db/go/src/github/gen0cide/gscript/compiler/computil/options.go:164 +0x339
main.init()
        /home/db/go/src/github/gen0cide/gscript/cmd/gscript/main.go:17 +0x7ef

Consider the following hacky workaround:

┌──(db㉿Hel)-[~/…/gen0cide/gscript/cmd/gscript]
└─$ export GO111MODULE=off 
┌──(db㉿Hel)-[~/…/gen0cide/gscript/cmd/gscript]
└─$ vim main.go 

Then modify the following lines of the gscript/cmd/gscript/main.go file: comment out the logurus dependency at line 7: // "github.com/sirupsen/logrus comment the usage of logurus on line 83: // cliLogger.Logger.SetLevel(logrus.DebugLevel)

ahhh avatar Apr 16 '22 19:04 ahhh

I found using a new/clean GOPATH works for me using go 1.16.15, without the source modification above.

mkdir /tmp/stuff1
export GOPATH=/tmp/stuff1
go get github.com/gen0cide/gscript/cmd/gscript
/tmp/stuff1/bin/gscript

eddiezab avatar May 24 '22 14:05 eddiezab