[英]How to fix on Mac OSX EACCES: permission denied...You don't have access to this file
I'm trying to make a new project with gatsby template running the command gatsby new website-public https://github.com/gatsbyjs/gatsby-starter-default
in Terminal window, but I constantly getting this error:我正在尝试使用 gatsby 模板创建一个新项目,在终端 window 中运行命令
gatsby new website-public https://github.com/gatsbyjs/gatsby-starter-default
,但我不断收到此错误:
gatsby new website-public https://github.com/gatsbyjs/gatsby-starter-default
Error: EACCES: permission denied, open '/Users/delilah/.config/gatsby/config.json'
You don't have access to this file.
at Object.openSync (node:fs:585:3)
at Object.readFileSync (node:fs:453:35)
at Ti._i.globalConfigPath.get all [as all] (/usr/local/lib/node_modules/gatsby-cli/node_modules/create-gatsby/lib/index.js:1:155965)
at new Ti._i.globalConfigPath (/usr/local/lib/node_modules/gatsby-cli/node_modules/create-gatsby/lib/index.js:1:155924)
at Ti (/usr/local/lib/node_modules/gatsby-cli/node_modules/create-gatsby/lib/index.js:1:155721)
at Object.<anonymous> (/usr/local/lib/node_modules/gatsby-cli/node_modules/create-gatsby/lib/index.js:1:486075)
at Module._compile (node:internal/modules/cjs/loader:1095:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1147:10)
at Module.load (node:internal/modules/cjs/loader:975:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
I have tried with following:我尝试过以下操作:
whoami
~/.npm whoami
~/.npmwhoami
/usr/local/lib/node_modules whoami
/usr/local/lib/node_modules But nothing helps, I'm using Mac OSX.但没有任何帮助,我使用的是 Mac OSX。
If anyone has some idea, please share.如果有人有什么想法,请分享。
The error message says that /Users/delilah/.config/gatsby/config.json
is the file you don't have access to, so that's the file you have to chown
and/or chmod
to fix, not paths you list as having tried.错误消息说
/Users/delilah/.config/gatsby/config.json
是您无权访问的文件,因此这是您必须chown
和/或chmod
修复的文件,而不是您列出的路径试过了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.