# Error while running @grafana/toolkit

**URL:** <https://community.grafana.com/t/error-while-running-grafana-toolkit/35381>\
**Category:** Grafana Plugin Development\
**Created:** [August 19, 2020, 3:38pm UTC](https://community.grafana.com/t/error-while-running-grafana-toolkit/35381 "2020-08-19T15:38:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![thomasbergerlpz](https://avatars.discourse-cdn.com/v4/letter/t/2acd7d/32.png) [@thomasbergerlpz](https://community.grafana.com/u/thomasbergerlpz)\
**Post date:** [August 19, 2020, 3:38pm UTC](https://community.grafana.com/t/error-while-running-grafana-toolkit/35381/1 "2020-08-19T15:38:03Z")

</div>

Hello everybody,

I use CentOS 8 and would like to create a new plugin.  
I proceeded according to the tutorial:

> **[Build a panel plugin](https://grafana.com/tutorials/build-a-panel-plugin/)**
>
> Learn at how to create a custom visualization for your dashboards.

Grafana 7.0 -\> Ok  
NodeJS 12.x -\> Ok  
yarn -\> Ok  
python -\> Ok

In the plugin directory, create a plugin from template using the plugin:create command:

npx @grafana/toolkit plugin:create my-plugin

npx @grafana/toolkit plugin:create my-plugin  
Unable to save binary /root/.npm/\_npx/1468239/lib/node\_modules/@grafana/toolkit/node\_modules/node-sass/vendor/linux-x64-64 : { Error: EACCES: permission denied, mkdir ‘/root/.npm/\_npx/1468239/lib/node\_modules/@grafana/toolkit/node\_modules/node-sass/vendor’  
at Object.mkdirSync (fs.js:757:3)  
at sync (/root/.npm/\_npx/1468239/lib/node\_modules/@grafana/toolkit/node\_modules/mkdirp/index.js:72:13)  
at Function.sync (/root/.npm/\_npx/1468239/lib/node\_modules/@grafana/toolkit/node\_modules/mkdirp/index.js:78:24)  
at checkAndDownloadBinary (/root/.npm/\_npx/1468239/lib/node\_modules/@grafana/toolkit/node\_modules/node-sass/scripts/install.js:114:11)  
at Object. (/root/.npm/\_npx/1468239/lib/node\_modules/@grafana/toolkit/node\_modules/node-sass/scripts/install.js:157:1)  
at Module.\_compile (internal/modules/cjs/loader.js:778:30)  
at Object.Module.\_extensions…js (internal/modules/cjs/loader.js:789:10)  
at Module.load (internal/modules/cjs/loader.js:653:32)  
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)  
at Function.Module.\_load (internal/modules/cjs/loader.js:585:3)  
errno: -13,  
syscall: ‘mkdir’,  
code: ‘EACCES’,  
path:  
‘/root/.npm/\_npx/1468239/lib/node\_modules/@grafana/toolkit/node\_modules/node-sass/vendor’ }  
gyp info it worked if it ends with ok  
gyp verb cli [ ‘/usr/bin/node’,  
gyp verb cli ‘/root/.npm/\_npx/1468239/lib/node\_modules/@grafana/toolkit/node\_modules/node-gyp/bin/node-gyp.js’,  
gyp verb cli ‘rebuild’,  
gyp verb cli ‘–verbose’,  
gyp verb cli ‘–libsass\_ext=’,  
gyp verb cli ‘–libsass\_cflags=’,  
gyp verb cli ‘–libsass\_ldflags=’,  
gyp verb cli ‘–libsass\_library=’ ]  
gyp info using node-gyp@3.8.0  
gyp info using node@10.21.0 | linux | x64  
gyp verb command rebuild []  
gyp verb command clean []  
gyp verb clean removing “build” directory  
gyp verb command configure []  
gyp verb check python checking for Python executable “python2” in the PATH  
gyp verb `which` succeeded python2 /usr/bin/python2  
gyp verb check python version `/usr/bin/python2 -c "import sys; print "2.7.17 gyp verb check python version .%s.%s" % sys.version_info[:3];"` returned: %j  
gyp verb get node dir no --target version specified, falling back to host node version: 10.21.0  
gyp verb command install [‘10.21.0’]  
gyp verb install input version string “10.21.0”  
gyp verb install installing version: 10.21.0  
gyp verb install --ensure was passed, so won’t reinstall if already installed  
gyp verb install version not already installed, continuing with install 10.21.0  
gyp verb ensuring nodedir is created /root/.node-gyp/10.21.0  
gyp WARN EACCES user “root” does not have permission to access the dev dir “/root/.node-gyp/10.21.0”  
gyp WARN EACCES attempting to reinstall using temporary dev dir “/root/.npm/\_npx/1468239/lib/node\_modules/@grafana/toolkit/node\_modules/node-sass/.node-gyp”  
gyp verb tmpdir == cwd automatically will remove dev files after to save disk space  
gyp verb command install [‘–node\_gyp\_internal\_noretry’, ‘10.21.0’]  
gyp verb install input version string “10.21.0”  
gyp verb install installing version: 10.21.0  
gyp verb install --ensure was passed, so won’t reinstall if already installed  
gyp verb install version not already installed, continuing with install 10.21.0  
gyp verb ensuring nodedir is created /root/.npm/\_npx/1468239/lib/node\_modules/@grafana/toolkit/node\_modules/node-sass/.node-gyp/10.21.0  
gyp WARN install got an error, rolling back install  
gyp verb command remove [‘10.21.0’]  
gyp verb remove using node-gyp dir: /root/.npm/\_npx/1468239/lib/node\_modules/@grafana/toolkit/node\_modules/node-sass/.node-gyp  
gyp verb remove removing target version: 10.21.0  
gyp verb remove removing development files for version: 10.21.0  
gyp WARN install got an error, rolling back install  
gyp verb command remove [‘10.21.0’]  
gyp verb remove using node-gyp dir: /root/.npm/\_npx/1468239/lib/node\_modules/@grafana/toolkit/node\_modules/node-sass/.node-gyp  
gyp verb remove removing target version: 10.21.0  
gyp verb remove removing development files for version: 10.21.0  
gyp ERR! configure error  
gyp ERR! stack Error: EACCES: permission denied, mkdir ‘/root/.npm/\_npx/1468239/lib/node\_modules/@grafana/toolkit/node\_modules/node-sass/.node-gyp’  
gyp ERR! System Linux 4.18.0-193.14.2.el8\_2.x86\_64  
gyp ERR! command “/usr/bin/node” “/root/.npm/\_npx/1468239/lib/node\_modules/@grafana/toolkit/node\_modules/node-gyp/bin/node-gyp.js” “rebuild” “–verbose” “–libsass\_ext=” “–libsass\_cflags=” “–libsass\_ldflags=” “–libsass\_library=”  
gyp ERR! cwd /root/.npm/\_npx/1468239/lib/node\_modules/@grafana/toolkit/node\_modules/node-sass  
gyp ERR! node -v v10.21.0  
gyp ERR! node-gyp -v v3.8.0  
gyp ERR! not ok  
Build failed with error code: 1  
npm ERR! code ELIFECYCLE  
npm ERR! errno 1  
npm ERR! node-sass@4.14.1 postinstall: `node scripts/build.js`  
npm ERR! Exit status 1  
npm ERR!  
npm ERR! Failed at the node-sass@4.14.1 postinstall script.  
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:  
npm ERR! /root/.npm/\_logs/2020-08-18T18\_05\_05\_712Z-debug.log  
Die Installation von @grafana/toolkit@latest ist mit dem Code 1 fehlgeschlagen

Can someone help me???

---

<div class="post-metadata">

**Author:** ![marcusolsson](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/marcusolsson/32/7922_2.png) [@marcusolsson](https://community.grafana.com/u/marcusolsson)\
**Post date:** [August 19, 2020, 3:40pm UTC](https://community.grafana.com/t/error-while-running-grafana-toolkit/35381/2 "2020-08-19T15:40:35Z")

</div>

Looks like you’re trying to install grafana-toolkit inside `/root/` which you don’t have permission to do. The command shouldn’t require root privileges to run.

---

<div class="post-metadata">

**Author:** ![flipp3003](https://avatars.discourse-cdn.com/v4/letter/f/ed8c4c/32.png) [@flipp3003](https://community.grafana.com/u/flipp3003)\
**Post date:** [August 19, 2020, 8:57pm UTC](https://community.grafana.com/t/error-while-running-grafana-toolkit/35381/3 "2020-08-19T20:57:43Z")

</div>

Hmm,

i have only started:  
npx @grafana/toolkit plugin:create my-plugin

I don’t know where the toolkit will be installed.  
I am in the directory:  
/var/lib/grafana/plugins

and I am logged in as root  
Access shouldn’t be a problem or am I missing something ???
