gpt4 book ai didi

node.js - 使用 Yeoman 安装 angular 出现 EACCES 错误

转载 作者:搜寻专家 更新时间:2023-10-31 22:55:40 26 4
gpt4 key购买 nike

我试过运行

yo angular --coffee --minsafe

但是我得到了这个错误

   Error: EACCES, permission denied '/Users/Basil/.config/configstore/insight-yo.yml'
at Object.fs.openSync (fs.js:427:18)
at Object.fs.writeFileSync (fs.js:966:15)
at Object.create.all.set (/usr/local/lib/node_modules/yo/node_modules/insight/node_modules/configstore/configstore.js:39:7)
at Object.Configstore (/usr/local/lib/node_modules/yo/node_modules/insight/node_modules/configstore/configstore.js:30:11)
at new Insight (/usr/local/lib/node_modules/yo/node_modules/insight/lib/insight.js:20:16)
at Object.<anonymous> (/usr/local/lib/node_modules/yo/bin/yo:26:15)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)

我检查了 Github 上的问题并看到了 npm / yeoman install generator-angular without sudo 但似乎无法让它工作

Node v0.10.17npm v1.2.10

find / -name 'yeoman'

/Users/Basil/.node/node_modules/.bin/yeoman/Users/Basil/.node/node_modules/yeoman/Users/Basil/.node/node_modules/yeoman/bin/yeoman/Users/Basil/.node/node_modules/yeoman/node_modules/yeoman-generators/lib/generators/yeoman/用户/罗勒/.npm/yeoman/Users/Basil/.npm/yeoman/0.9.6/package/bin/yeoman/Users/Basil/.npm/yeoman-generators/0.9.5/package/lib/generators/yeoman

最佳答案

我能够解决这个问题:

Sudo chown Basil /Users/Basil/.config/configstore/update-notifier-yo.yml

如果您遇到这个问题,试试这个,用您的用户名替换“Basil”

关于node.js - 使用 Yeoman 安装 angular 出现 EACCES 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18704547/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com