yarn icon indicating copy to clipboard operation
yarn copied to clipboard

"Cannot find a suitable global folder" when using --global-folder with a writable folder

Open tzzh opened this issue 3 years ago • 6 comments

I am getting the following warning when running yarn run something

warning Cannot find a suitable global folder. Tried these: "/usr/local, /app/.yarn"

as these folders are not writable, I tried to run the command with yarn --global-folder /tmp/yarn/ run something which is a writable folder but I am still getting the same error, is there another flag to get this to work ?

tzzh avatar Oct 14 '21 10:10 tzzh

same problem

GulievAnar31 avatar Jan 17 '22 13:01 GulievAnar31

I'm having many yarn commands work with --global-folder, but not with when the command invokes the rescript executable.

quinn-dougherty avatar Aug 02 '22 17:08 quinn-dougherty

We're seeing this same warning, but it doesn't look like we're passing the --global-folder option at all.

cjcrandall avatar Aug 03 '22 15:08 cjcrandall

same thing here (although.. no --global-folder being passed). user id is 1004.

[5/5] Building fresh packages...
warning Cannot find a suitable global folder. Tried these: "/usr/local, /.yarn"
warning Cannot find a suitable global folder. Tried these: "/usr/local, /.yarn"
warning Cannot find a suitable global folder. Tried these: "/usr/local, /.yarn"
warning Cannot find a suitable global folder. Tried these: "/usr/local, /.yarn"
warning Cannot find a suitable global folder. Tried these: "/usr/local, /.yarn"
warning Cannot find a suitable global folder. Tried these: "/usr/local, /.yarn"
warning Cannot find a suitable global folder. Tried these: "/usr/local, /.yarn"
error /app/node_modules/sharp: Command failed.
Exit code: 1
Command: (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
Arguments:
Directory: /app/node_modules/sharp
Output:
sharp: Installation error: EACCES: permission denied, mkdir '/.npm'
sharp: Are you trying to install as a root or sudo user?
sharp: - For npm <= v6, try again with the "--unsafe-perm" flag
sharp: - For npm >= v8, the user must own the directory "npm install" is run in
sharp: Please see https://sharp.pixelplumbing.com/install for required dependencies
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

yogo1212 avatar Mar 31 '23 17:03 yogo1212

I also have this warning on Jenkins, but it does not brake anything

alexiusp avatar Jul 13 '23 13:07 alexiusp