Help building backend datasource (MQTT for streaming data)

I installed Go first according to these instructions and I now have a Go folder in the usr/local folder and my version appears as 1.17:

root@Debian-Dell:~# export PATH=$PATH:/usr/local/go/bin
root@Debian-Dell:~# go version
go version go1.17 linux/amd64

Then I installed Mage according to these instructions and have a mage folder in the root directory:
image

And then did the following (which seemed successful since I did not see any error messages):

root@Debian-Dell:~# cd mage
root@Debian-Dell:~/mage# go run bootstrap.go
Running target: Install
exec: go env GOBIN
exec: go env GOPATH
exec: git rev-parse --short HEAD
exec: git describe --tags
exec: go build -o /root/go/bin/mage -ldflags=-X "github.com/magefile/mage/mage.timestamp=2021-08-31T13:22:33-04:00" -X "github.com/magefile/mage/mage.commitHash=4cf3cfc" -X "github.com/magefile/mage/mage.gitTag=v1.11.0-2-g4cf3cfc" github.com/magefile/mage

With Go and Mage apparently installed correctly, I tried yarn install (which gave me no errors, just like last time) and then yarn build, I got a little bit further, but still ended with the /bin/sh: 1: mage: not found

root@Debian-Dell:/var/lib/grafana/grafana-plugins/mqtt-datasource-main# yarn build
yarn run v1.22.11
$ rm -rf dist && grafana-toolkit plugin:build && mage build:backend
  Using Node.js v14.17.5
  Using @grafana/toolkit v8.0.0-beta.3
✔ Preparing
✔ Linting
ts-jest[config] (WARN) The option `tsConfig` is deprecated and will be removed in ts-jest 27, use `tsconfig` instead
 PASS  src/handleEvent.test.ts

Test Suites: 1 passed, 1 total
Tests:       2 passed, 2 total
Snapshots:   2 passed, 2 total
Time:        0.713 s, estimated 1 s
Ran all test suites with tests matching "".
✔ Running tests
⠋ Compiling...  Starting type checking service...
  Using 1 worker with 2048MB memory limit
⠦ Compiling...  
   Hash: 6b5a018b08c2ac55e195
  Version: webpack 4.41.5
  Time: 5850ms
  Built at: 08/31/2021 12:39:42 PM
                  Asset        Size  Chunks                   Chunk Names
           CHANGELOG.md    53 bytes          [emitted]        
                LICENSE    11.1 KiB          [emitted]        
              README.md    3.69 KiB          [emitted]        
           img/mqtt.svg    1.31 KiB          [emitted]        
              module.js     3.8 KiB       0  [emitted]        module
  module.js.LICENSE.txt   808 bytes          [emitted]        
          module.js.map      24 KiB       0  [emitted] [dev]  module
            plugin.json  1000 bytes          [emitted]        
  Entrypoint module = module.js module.js.map
  [0] external "react" 42 bytes {0} [built]
  [1] external "@grafana/ui" 42 bytes {0} [built]
  [2] external "lodash" 42 bytes {0} [built]
  [3] external "@grafana/data" 42 bytes {0} [built]
  [4] external "@grafana/runtime" 42 bytes {0} [built]
  [5] ./module.ts + 5 modules 14.5 KiB {0} [built]
      | ./module.ts 296 bytes [built]
      | ./datasource.ts 352 bytes [built]
      | ./ConfigEditor.tsx 2.78 KiB [built]
      | ./QueryEditor.tsx 658 bytes [built]
      | ../node_modules/tslib/tslib.es6.js 10 KiB [built]
      | ./handleEvent.ts 395 bytes [built] 
  
✔ Compiling...
/bin/sh: 1: mage: not found
error Command failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.