Hi all,
I’ve been working on a backend data source plugin, but I’ve recently been experiencing some errors when creating a new plugin using npx or running yarn. For example:
$ npx @grafana/toolkit@next plugin:create my-plugin
Unexpected token {
And when running yarn:
$ yarn --ignore-engines build
yarn run v1.22.4
$ grafana-toolkit plugin:build
/home/harry/grafana/plugins/grafana-gitlab-ci/node_modules/@grafana/toolkit/bin/grafana-toolkit.js:19
} catch {
^
SyntaxError: Unexpected token {
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:616:28)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:188:16)
at bootstrap_node.js:609:3
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I’m running on WSL Ubuntu 18.04 with node v8.10 and yarn 1.22.4.
Has anyone else experienced a similar issue or have any suggestions on how to fix this?