I'm trying to create a custom plugin for my superset, but when when I run npm install -g yo command in my terminal, I get the following error:
/usr/lib/node_modules/yo/node_modules/conf/index.js:128
throw err;
^
Error: EACCES: permission denied, open '/root/.config/insight-nodejs/insight-yo.json'
at Object.openSync (fs.js:498:3)
at Object.readFileSync (fs.js:394:35)
at Conf.get store [as store] (/usr/lib/node_modules/yo/node_modules/conf/index.js:108:18)
at Conf.get (/usr/lib/node_modules/yo/node_modules/conf/index.js:47:27)
at Insight.get optOut [as optOut] (/usr/lib/node_modules/yo/node_modules/insight/lib/index.js:52:22)
at Object.<anonymous> (/usr/lib/node_modules/yo/lib/cli.js:208:48)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:14) {
errno: -13,
syscall: 'open',
code: 'EACCES',
path: '/root/.config/insight-nodejs/insight-yo.json'
}
Any idea what's causing this?
Run the command as root user as below