singnet / snet-daemon

Service Daemon exposes an AI application as an API that is accessible through the SingularityNET Network. It handles all interaction with the blockchain for authorization and payment using AGI tokens and passes through API calls to the AI application.
MIT License
46 stars 49 forks source link

nodejs not in $PATH for ./scripts/install #575

Closed gl-yziquel closed 8 months ago

gl-yziquel commented 1 year ago

On ubuntu 22, the ./scripts/install fails as follows:

mini-me@virtucon ~/h/c/snet-daemon (master)> ./scripts/install
++++ dirname ./scripts/install
+++ cd ./scripts
+++ pwd -P
++ dirname /home/mini-me/home/cellar/snet-daemon/scripts
+ PARENT_PATH=/home/mini-me/home/cellar/snet-daemon
+ pushd /home/mini-me/home/cellar/snet-daemon
~/home/cellar/snet-daemon ~/home/cellar/snet-daemon
+ go get github.com/golang/protobuf/protoc-gen-go@v1.2.0
go: module github.com/golang/protobuf is deprecated: Use the "google.golang.org/protobuf" module instead.
+ go get github.com/ethereum/go-ethereum/cmd/abigen@v1.8.27
+ go get google.golang.org/grpc@v1.16.0
go: module github.com/golang/protobuf is deprecated: Use the "google.golang.org/protobuf" module instead.
+ go get golang.org/x/lint/golint
+ pushd resources/blockchain
~/home/cellar/snet-daemon/resources/blockchain ~/home/cellar/snet-daemon ~/home/cellar/snet-daemon
+ npm install
up to date, audited 133 packages in 4s
18 vulnerabilities (1 low, 9 moderate, 4 high, 4 critical)
To address issues that do not require attention, run:
  npm audit fix
To address all issues (including breaking changes), run:
  npm audit fix --force
Run `npm audit` for details.
+ popd
~/home/cellar/snet-daemon ~/home/cellar/snet-daemon
+ go generate ./...
blockchain/blockchain.go:1: running "nodejs": exec: "nodejs": executable file not found in $PATH

The nodejs executable is indeed not available in ubuntu 22, at least on my current setup. The only executable I have installed is node.

gl-yziquel commented 1 year ago

Making a symlink to /usr/bin/nodecallednodejs` seems to solve the issue.

It's brittle, however.

semyon-dev commented 9 months ago

Fixed in https://github.com/singnet/snet-daemon/commit/406ed9c247382fa8e2167e6e7e4418d6a49f3560#diff-37b6e7ed4f299b87b357b54376123393b34ee0699fc035f25bc0621627dcc6ba