Providing an update: It was found that the corporate proxy was preventing the binary download for node-sass. Once that was resolved, I was able to successfully install node-sass (v4.14.1) globally with the command ‘npm install --unsafe-perm -g node-sass’. However, the same error result happens when using the npx command to a create a sample plugin in that it cannot located node-sass.
An alternative strategy was attempted by using the simple react panel (GitHub - grafana/grafana-starter-panel: A starter for Grafana panel plugins ), as suggested in another post:
I encountered an error after following the tutorial instructions in step 3 for creating panel plugins:
…
[root@ip-10-56-250-233 20200612 18:37:40 grafana-plugins]# npx @grafana/toolkit plugin:create my-plugin
internal/modules/cjs/loader.js:1032
throw err;
^
Error: Cannot find module '/root/.npm/_npx/1554/lib/node_modules/@grafana/toolkit/node_modules/node-sass/scripts/install.js ’
at Function.Module._resolveFilename (internal/modules/cjs/loader.…
The plugin was able to install locally, however, it does not appear on the console plugin list as discussed in this post:
I installed the simple react panel (https://github.com/grafana/simple-react-panel ) and it does not appear in the plugin list on the Grafana console after restarting grafana-server.
Prior to this I installed Node.js (v12.18.3), yarn (v1.22.4), and node-sass (4.14.1), copied the folder simple-react-panel-master into the default plugin directory /var/lib/grafana/plugins, and specified the default directory in the config file grafana.ini under [paths].
Inside folder ‘/var/lib/grafana/plugins/simpl…