Asgarrrr / Luna

An adorable discord bot fully customizable created in javascript, using Discord.js and mongoDB that is constantly growing !
https://lunadoc.vercel.app/
GNU General Public License v3.0
24 stars 3 forks source link

Problems installing yarn with npm #36

Open alitnery opened 3 years ago

alitnery commented 3 years ago

This is all my problem

---> npm install --global yarn npm WARN checkPermissions Missing write access to /usr/local/lib npm ERR! code EACCES npm ERR! syscall access npm ERR! path /usr/local/lib npm ERR! errno -13 npm ERR! Error: EACCES: permission denied, access '/usr/local/lib' npm ERR! { [Error: EACCES: permission denied, access '/usr/local/lib'] npm ERR! stack: npm ERR! 'Error: EACCES: permission denied, access \'/usr/local/lib\'', npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'access', npm ERR! path: '/usr/local/lib' } npm ERR! npm ERR! The operation was rejected by your operating system. npm ERR! It is likely you do not have the permissions to access this file as the current user npm ERR! npm ERR! If you believe this might be a permissions issue, please double-check the npm ERR! permissions of the file and its containing directories, or try running npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in: npm ERR! /home/an/.npm/_logs/2021-05-31T19_05_04_058Z-debug.log

Asgarrrr commented 3 years ago

Hi !

This simply means that npm is not allowed to write to the /usr/local/lib folder :/

alitnery commented 3 years ago

Hi! Sorry but I can handle it

Actually, rigth now I have this

(base) an@DESKTOP-IU637JE:/mnt/c/Users/Alitnery/Documents/Programas_Linux$ npm install -g npm npm ERR! code EACCES npm ERR! syscall rename npm ERR! path /home/an/.npm-global/lib/node_modules/.staging/npm-87b0b1ef/node_modules/string-width npm ERR! dest /home/an/.npm-global/lib/node_modules/.staging/string-width-0605772d npm ERR! errno -13 npm ERR! npm ERR! Your cache folder contains root-owned files, due to a bug in npm ERR! previous versions of npm which has since been addressed. npm ERR! npm ERR! To permanently fix this problem, please run: npm ERR! sudo chown -R 1000:1000 "/home/an/.npm"

npm ERR! A complete log of this run can be found in: npm ERR! /home/an/.npm/_logs/2021-06-08T17_30_25_101Z-debug.log

and

(base) an@DESKTOP-IU637JE:~$ mv .npm /Programas:Linux mv: cannot move '.npm' to '/Programas:Linux': Permission denied

I do not what to do to fix it

Asgarrrr commented 3 years ago

https://unix.stackexchange.com/questions/234278/why-do-i-get-permission-denied-when-using-mv-although-directory-rights-are-corre

yamaiYuzuru commented 3 years ago

try sudo npm install --global yarn I guess it will help.