microsoft / vscode-generator-code

Visual Studio Code extension generator
Other
1.29k stars 222 forks source link

EACCES: permission denied #417

Open horsley opened 1 year ago

horsley commented 1 year ago
? What type of extension do you want to create? New Extension (JavaScript)
? What's the name of your extension? sg-dev-helper
? What's the identifier of your extension? sg-dev-helper
? What's the description of your extension? 
? Enable JavaScript type checking in 'jsconfig.json'? No
? Initialize a git repository? Yes
? Which package manager to use? npm
✖ An error occured while running code:app#writing
Error code 

EACCES: permission denied, mkdir '/data/sg-ext/sg-dev-helper'
┌───────────────────────────────────────────────────┐
│              yo update check failed               │
│        Try running with sudo or get access        │
│       to the local update config store via        │
│ sudo chown -R $USER:$(id -gn $USER) /root/.config │
└───────────────────────────────────────────────────┘

sudo or chown didn't help, yo code using root account

horsley commented 1 year ago

After several investigation, I found that the issue can be reproduced when current directory path has an dash