| Summary: | Missing write access for /usr/lib/node_modules/ when running npm install --global yarn to install yarn | ||
|---|---|---|---|
| Product: | Mageia | Reporter: | Kristoffer Grundström <lovaren> |
| Component: | RPM Packages | Assignee: | Mageia Bug Squad <bugsquad> |
| Status: | RESOLVED WORKSFORME | QA Contact: | |
| Severity: | major | ||
| Priority: | Normal | CC: | lewyssmith, lovaren |
| Version: | 8 | ||
| Target Milestone: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Source RPM: | npm | CVE: | |
| Status comment: | |||
| Attachments: | Complete log file | ||
|
Description
Kristoffer Grundström
2023-01-28 15:15:38 CET
It mentioned in this issue on the yarn GitHub repo: https://github.com/yarnpkg/yarn/issues/1806 Searching the issues tab using "access denied" shows that more than me experience this as well. You need to run "sudo npm install --global yarn" or "su -c 'npm install --global yarn'" .... That's it... Btw why do you expect to have write permission as normal user for /usr/lib/? You need root or sudo rights for it... (In reply to sturmvogel from comment #4) > You need to run "sudo npm install --global yarn" or "su -c 'npm install > --global yarn'" .... > > That's it... Of course, but if you look at this section for instance, you see that it doesn't mention the need for using sudo or su -c which is odd if you really must use it: https://github.com/signalapp/Signal-Desktop/blob/main/CONTRIBUTING.md#all-platforms Comment 2 leads to the solutions. 1. As already mentioned in comment 4: sudo npm i yarn --global or sudo npm install --global yarn or su -c 'npm install --global yarn' 2. remove the node_modules & yarn.lock and run 'yarn' pr deleted node_modules and yarn.lock and run yarn add [libToInstall] Closing as it is not a Mageia problem, but generic application. Status:
NEW =>
RESOLVED |