Error: EACCES: permission denied, open '/root/office-addin-usage-data.json'

Evgeny Fishgalov 0 Reputation points
2024-02-16T20:06:43.68+00:00

Weird (given the root rights) error of yo on Debian 12:

# yo office
     _-----_     ╭──────────────────────────╮
    |       |    │   Welcome to the Office  │
    |--(o)--|    │   Add-in generator, by   │
   `---------´   │ @OfficeDev! Let's create │
    ( _´U`_ )    │    a project together!   │
    /___A___\   /╰──────────────────────────╯
     |  ~  |
   __'.___.'__
 ´   `  |° ´ Y `
? Office Add-in CLI tools collect anonymized usage data which is sent to Microsoft to help improve our product. Please
read our privacy notice at https://aka.ms/OfficeAddInCLIPrivacy. ​To disable data collection, choose Exit and run “npx
office-addin-usage-data off”.
 Continue
? Choose a project type: Office Add-in Task Pane project
? Choose a script type: JavaScript
? What do you want to name your add-in? gesetze-im-word
? Which Office client application would you like to support? Word
✖ An error occured while running office:app#prompting
Error office
Error: EACCES: permission denied, open '/root/office-addin-usage-data.json'
┌───────────────────────────────────────────────────┐
│              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 │
└───────────────────────────────────────────────────┘
Microsoft 365 and Office | Development | Other
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.