ISSUE
- How do I tell npm to use the local install rather than the nvm global install to use the go command seen below?
INFO
$ 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 github.com/ethereum/go-ethereum
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
OLDPWD=/home/delta/go/src/github.com/ethereum
PWD=/home/user/go
GOPATH=/home/user/go
I removed global go:
$ npm uninstall -g go
Verified npm global to ensure removal:
$ npm list -g -depth=0
/home/user/.nvm/versions/node/v12.6.0/lib
├── 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 github.com/ethereum/go-ethereum
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
OLDPWD=/home/user/go/src/github.com/ethereum/go-ethereum
PWD=/home/user/go
I did try checking yesterday (6/19/2019) on stackoverflow > javascript chat room, but did not get tracktion.
FIX:
Remember that online tuts do NOT "dockerize" information, some must be gathered around.
Install go , instructions https://golang.org/doc/install?download=go1.12.7.linux-amd64.tar.gz
Top comments (0)