DEV Community 👩‍💻👨‍💻

David Peck
David Peck

Posted on

Basics#1 Noob troubleshooting "go get"


  • How do I tell npm to use the local install rather than the nvm global install to use the go command seen below?


$ npm list -depth=0
gopak@1.0.0 /home/user/go
├── git@0.1.5
├── go@3.0.1
└── npm@6.10.1

$ go get
Error: command is not recognized
at /home/user/.nvm/versions/node/v12.6.0/lib/node_modules/go/node_modules/go-cli/lib/invoke.js:24:13
at processTicksAndRejections (internal/process/task_queues.js:85:5)
$ env |grep go

I removed global go:

$ npm uninstall -g go

Verified npm global to ensure removal:

$ npm list -g -depth=0
├── browserify@16.3.0
├── ethers@4.0.33
├── ethers-cli@4.0.0
├── ganache-cli@6.4.5
├── jquery@3.4.1
├── lite-server@2.5.3
├── npm@6.9.0
├── npx@10.2.0
└── truffle@5.0.27

Tried connecting again but it checks the nvm path, so of course it is expected to not find any go:

$ go get
bash: /home/user/.nvm/versions/node/v12.6.0/bin/go: No such file or directory

Issue tied to nvm...

Checked env again:

$ export GOPATH="$HOME/go"
$ env |grep go

I did try checking yesterday (6/19/2019) on stackoverflow > javascript chat room, but did not get tracktion.

Remember that online tuts do NOT "dockerize" information, some must be gathered around.
Install go , instructions

Top comments (0)

🤔 Did you know?

DEV has a variety of tags to help you find the content you like. Find and follow your favorite tags.