启动VSCode时访问被拒绝

时间:2018-01-09 16:38:17

标签: visual-studio-code

我正在尝试启动VSCode,但我收到了拒绝访问错误。

错误粘贴在下面。我只能用code --user-data-dir="./vscode-root"打开应用程序,但不确定这是不是一个好习惯。

我还将/Applications/Visual Studio Code.app/Contents/MacOS/的权限更改为“读取和写入”。

提前致谢, 露

{ Error: EACCES: permission denied, mkdir '/Users/lucijac/Library/Application Support/Code/logs/20180109T152903'
    at Object.fs.mkdirSync (fs.js:895:18)
    at Function.sync (/Applications/Visual Studio Code.app/Contents/Resources/app/node_modules/mkdirp/index.js:71:13)
    at RotatingLogger (/Applications/Visual Studio Code.app/Contents/Resources/app/node_modules/spdlog/index.js:13:11)
    at Object.t.createLogService (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:178:426)
    at q (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:407:340)
    at G (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:411:127)
    at Object.<anonymous> (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:411:922)
    at Function.t._safeInvokeFunction (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:19:213)
    at Function.t._invokeFactory (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:19:460)
    at t.complete (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:19:731)
  errno: -13,
  code: 'EACCES',
  syscall: 'mkdir',
  path: '/Users/lucijac/Library/Application Support/Code/logs/20180109T152903' }
[main 15:29:03] Startup error: ,,,Error: EACCES: permission denied, mkdir '/Users/lucijac/Library/Application Support/Code/logs/20180109T152903'

1 个答案:

答案 0 :(得分:0)

你的第一行说明了这一点,也是最后一行:

Error: EACCES: permission denied, mkdir '/Users/lucijac/Library/Application Support/Code/logs/20180109T152903'

无法为您登录的用户创建此目录。检查所有路径权限 - 这些目录是否已创建&amp;由root /其他用户拥有。它可能不是VS Code问题,可能是权限问题。