npm install -g protoc-gen-js
sudo apt install protoc-gen-go
dart pub global activate protoc_plugin
you also have to update your path to add pub-cache/bin directory should look something like this in your .bashrc file
export PUB_DIR = ~/.pub-cache/bin export PATH=$PATH:$PUB_DIR