Missing dot in first path element

Hi Team,

I have tried to create one small app but I get some errors

Below I have pated error:

/home/gslab/go/pkg/mod/github.com/joho/godotenv@v1.3.0/godotenv.go:17:2: malformed module path “bufio”: missing dot in first path element
/home/gslab/go/pkg/mod/github.com/joho/godotenv@v1.3.0/godotenv.go:18:2: malformed module path “errors”: missing dot in first path element
/home/gslab/go/pkg/mod/github.com/joho/godotenv@v1.3.0/godotenv.go:19:2: malformed module path “fmt”: missing dot in first path element
/home/gslab/go/pkg/mod/github.com/joho/godotenv@v1.3.0/godotenv.go:20:2: malformed module path “io”: missing dot in first path element
/home/gslab/go/pkg/mod/github.com/joho/godotenv@v1.3.0/godotenv.go:21:2: malformed module path “os”: missing dot in first path element
/home/gslab/go/pkg/mod/github.com/joho/godotenv@v1.3.0/godotenv.go:22:2: malformed module path “os/exec”: missing dot in first path element
/home/gslab/go/pkg/mod/github.com/joho/godotenv@v1.3.0/godotenv.go:23:2: malformed module path “regexp”: missing dot in first path element
/home/gslab/go/pkg/mod/github.com/joho/godotenv@v1.3.0/godotenv.go:24:2: malformed module path “sort”: missing dot in first path element
/home/gslab/go/pkg/mod/github.com/joho/godotenv@v1.3.0/godotenv.go:25:2: malformed module path “strings”: missing dot in first path element

Any help appreciated

Thanks
Shekhar

For some reason it seems as if your go compiler isn’t recognizing its internal modules.

Can you please tell us which version of go you are using and how you installed it? And what operating system do you use?

Hi @NobbZ,

Thanks for your quick response.

Please find the detail below

Go Version: go1.13.5
OS: Ubuntu 18.04

I had install go as per given doc by go. Download tar file and as per the instruction, I had install Go.

From J. Barton’s repository (GitHub)

godotenv.go

// and all the env vars declared in .env will be available through os.Getenv(“SOME_ENV_VAR”)

I am also trying to import some packages from github and it allows me to get some packages and gives following error on some in the same repository

C:\Go\src>go get github.com/couchbase/query/datastore
go: finding github.com/couchbase/query latest
bytes\buffer.go:10:2: malformed module path “errors”: missing dot in first path element
internal\fmtsort\sort.go:13:2: malformed module path “sort”: missing dot in first path element

I have sucessfully get the github. com/couchbase/query path but gives error in the next files

Kindly help.

Remove any earlier downloaded and/or created files and follow the instructions.

Steps to create a build

I still get error by using the commands
C:\Go\go-work> export GOPATH=$HOME/query
‘export’ is not recognized as an internal or external command,
operable program or batch file.

C:\Go\go-work>export GOPATH=$HOME/query
‘export’ is not recognized as an internal or external command,
operable program or batch file.

export is a *sh-thing.

In windows cmd.exe terminals you have to use set, also it is %HOME% there.

Not sure about what has to be changed when using powershell.

Thanks. I really appreciate

Thank you very much. But it still give the error

Have you done go get first?

Also are you in a legacy project or in a go module?

I get the following error.
C:/n1q l>go build n1ql.go
github.com/andelf/go-curl
…\andelf\go-curl\easy.go:408:22: identifier “_Ctype_struct_curl_slist” may conflict with identifiers generated by cgo

And I am in go module and I am trying to work on the parser module in github.com/couchbase/query

I want to use only the AST for couch-base. Can I use the Parser function independently. i am trying to use the AST generator in the following link : https://github.com/couchbase/query
Can u guide me through the process

If anyone is interested a query developer referred me to the mad-hatter.xml file; and informed that the mad-hatter branch has only been tested with go1.11.

https://nurmi-labs.github.io/dos/help.html

https://github.com/golang/go/wiki/SettingGOPATH

wiki: SettingGOPATH (redesign) #34967