【问题标题】:yo angular EACCESS error when creating package.json创建package.json时出现角度EACCESS错误
【发布时间】:2017-07-13 05:06:56
【问题描述】:

在完成命令行“yo angular”并遵循不同的步骤后,我得到了这个错误:

Screenshot error

我尝试将它作为“sudo yo angular”运行,但没有解决问题。

任何解决方案的想法? 谢谢

【问题讨论】:

  • 尝试打开 admin command prompt for windows 和 sudo su for ubuntu
  • 最后一行明确提到了
  • 根据您的指示:这是我得到的:错误:EACCES:权限被拒绝,打开 '/var/root/.config/configstore/insight-yo.json' 您无权访问这个文件。在 Object.fs.readFileSync (fs.js:509:33) 在 Object.get (/usr/local/lib/node_modules/yo) 的 Object.fs.openSync (fs.js:641:18) /node_modules/insight/node_modules/configstore/index.js:34:26) 在 Object.Configstore.get (/usr/local/lib/node_modules/yo/node_modules/insight/node_modules/configstore/index.js:81:13 )
  • 试一试,你的角度不会有危险
  • 我希望你尝试这样sudo su然后输入密码yo angular

标签: angularjs yo


【解决方案1】:

试试这些

npm cache clean

bower cache clean

或者

sudo chown username /var/root/.config/configstore/insight-yo.json

sudo chown /var/root/.config/configstore/insight-yo.json

我希望这会有所帮助。

【讨论】:

  • npm + bower cache clean 帮助了我 Sacha。谢谢你的帮助。
猜你喜欢
  • 2020-12-29
  • 2021-03-15
  • 1970-01-01
  • 2020-07-06
  • 2014-10-17
  • 2021-06-27
  • 2018-12-03
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多