当前位置: 首页 > 工具软件 > Hubot Sans > 使用案例 >

启动hubot报错

谷梁存
2023-12-01

1、安装hubot

npm install -g yo

2、启动
运行时如果报如下错误:

usr/lib/node_modules/yo/node_modules/write-file-atomic/index.js:197
    throw err
    ^

Error: EACCES: permission denied, open '/root/.config/insight-nodejs/insight-yo.json.1460022709'
    at Error (native)
    at Object.fs.openSync (fs.js:642:18)
    at Function.writeFileSync [as sync] (/usr/lib/node_modules/yo/node_modules/write-file-atomic/index.js:180:17)
    at Conf.set store [as store] (/usr/lib/node_modules/yo/node_modules/conf/index.js:142:19)
    at Conf.set (/usr/lib/node_modules/yo/node_modules/conf/index.js:64:14)
    at Insight.set optOut [as optOut] (/usr/lib/node_modules/yo/node_modules/insight/lib/index.js:56:15)
    at Object.<anonymous> (/usr/lib/node_modules/yo/lib/cli.js:198:18)
    at Module._compile (module.js:577:32)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)

该报错是由于文件的所有者有问题,尝试以下解决方法:

chown -R $USER /root/.config/insight-nodejs/

注意:/root/.config/insite-nodejs是上面出现的那个文件的目录(Error: EACCES: permission denied, open ‘/root/.config/insight-nodejs/insight-yo.json.1460022709’)根据个人实际情况更改

 类似资料: