当我尝试使用 Yeoman 生成器时此链接,我收到以下错误信息:
root@SYSGSOFT:/home/sysg_soft# yo flask-api
/usr/lib/node_modules/yo/node_modules/insight/node_modules/configstore/index.js:53
throw err;
^
Error: EACCES: permission denied, open '/root/.config/configstore/insight-yo.json'
You don't have access to this file.
at Object.fs.openSync (fs.js:577:33)
at Object.fs.readFileSync (fs.js:483:33)
at Configstore.get (/usr/lib/node_modules/yo/node_modules/insight/node_modules/configstore/index.js:34:26)
at Configstore.get (/usr/lib/node_modules/yo/node_modules/insight/node_modules/configstore/index.js:81:14)
at Insight.get (/usr/lib/node_modules/yo/node_modules/insight/lib/index.js:48:22)
at Object.<anonymous> (/usr/lib/node_modules/yo/lib/cli.js:197:48)
at Module._compile (internal/modules/cjs/loader.js:702:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)
at Module.load (internal/modules/cjs/loader.js:612:32)
答案1
要启动 flask-api Yeoman 生成器,请yo flask-api
以普通用户身份(而不是 root 用户身份)运行该命令。