Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

running step "yarn install" for yari on windows 10 #10717

Open
3 tasks done
Byron2016 opened this issue Mar 18, 2024 · 3 comments
Open
3 tasks done

running step "yarn install" for yari on windows 10 #10717

Byron2016 opened this issue Mar 18, 2024 · 3 comments
Labels
idle p4 Not urgent, only if time allows windows

Comments

@Byron2016
Copy link

Summary

I use:

  • OS: windows 10 V22H2 (compilation 19045.4170)
  • git bash: 2.42.0.2
  • Node: v18.19.1
  • npm: 10.2.4
  • yarn: 1.22.22

I can't install yari's dependencies through yarn command.
I am running yarn into a git bash console with Administrator Privileges
I am not sure how to fix it.

`
$ yarn
yarn install v1.22.22
[1/5] Validating package.json...
[2/5] Resolving packages...
success Already up-to-date.
$ (husky || true) && yarn install:all && yarn install:all:npm
yarn run v1.22.22
$ find . -mindepth 2 -name 'yarn.lock' ! -wholename '/node_modules/' -print0 | xargs -n1 -0 sh -cx 'yarn --cwd $(dirname $0) install'
++ dirname ./client/pwa/yarn.lock

  • yarn --cwd ./client/pwa install
    [1/4] Resolving packages...
    success Already up-to-date.
    ++ dirname ./libs/locale-utils/yarn.lock
  • yarn --cwd ./libs/locale-utils install
    [1/4] Resolving packages...
    success Already up-to-date.
    ++ dirname ./libs/pong/yarn.lock
  • yarn --cwd ./libs/pong install
    [1/4] Resolving packages...
    success Already up-to-date.
    ++ dirname ./libs/slug-utils/yarn.lock
  • yarn --cwd ./libs/slug-utils install
    [1/4] Resolving packages...
    success Already up-to-date.
    Done in 91.68s.
    yarn run v1.22.22
    $ find . -mindepth 2 -name 'package-lock.json' ! -wholename '/node_modules/' -print0 | xargs -n1 -0 sh -cx 'npm --prefix $(dirname $0) install'
    ++ dirname ./cloud-function/package-lock.json
  • npm --prefix ./cloud-function install
    npm WARN cleanup Failed to remove some directories [
    npm WARN cleanup [
    npm WARN cleanup 'D:\dev_20220602\Colaboraciones\mdn\yari\cloud-function\node_modules',
    npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'D:\dev_20220602\Colaboraciones\mdn\yari\cloud-function\node_modules\resolve'] {
    npm WARN cleanup errno: -4048,
    npm WARN cleanup code: 'EPERM',
    npm WARN cleanup syscall: 'rmdir',
    npm WARN cleanup path: 'D:\dev_20220602\Colaboraciones\mdn\yari\cloud-function\node_modules\resolve'
    npm WARN cleanup }
    npm WARN cleanup ]
    npm WARN cleanup ]
    npm ERR! code 123
    npm ERR! path D:\dev_20220602\Colaboraciones\mdn\yari
    npm ERR! command failed
    npm ERR! command C:\Windows\system32\cmd.exe /d /s /c (husky || true) && yarn install:all && yarn install:all:npm
    npm ERR! $ find . -mindepth 2 -name 'yarn.lock' ! -wholename '/node_modules/' -print0 | xargs -n1 -0 sh -cx 'yarn --cwd $(dirname $0) install'
    npm ERR! [1/4] Resolving packages...
    npm ERR! success Already up-to-date.
    npm ERR! [1/4] Resolving packages...
    npm ERR! success Already up-to-date.
    npm ERR! [1/4] Resolving packages...
    npm ERR! success Already up-to-date.
    npm ERR! [1/4] Resolving packages...
    npm ERR! success Already up-to-date.
    npm ERR! $ find . -mindepth 2 -name 'package-lock.json' ! -wholename '/node_modules/' -print0 | xargs -n1 -0 sh -cx 'npm --prefix $(dirname $0) install'
    npm ERR! info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
    npm ERR! ++ dirname ./client/pwa/yarn.lock
    npm ERR! + yarn --cwd ./client/pwa install
    npm ERR! ++ dirname ./libs/locale-utils/yarn.lock
    npm ERR! + yarn --cwd ./libs/locale-utils install
    npm ERR! ++ dirname ./libs/pong/yarn.lock
    npm ERR! + yarn --cwd ./libs/pong install
    npm ERR! ++ dirname ./libs/slug-utils/yarn.lock
    npm ERR! + yarn --cwd ./libs/slug-utils install
    npm ERR! ++ dirname ./cloud-function/package-lock.json
    npm ERR! + npm --prefix ./cloud-function install
    npm ERR! npm ERR! code 123
    npm ERR! npm ERR! path D:\dev_20220602\Colaboraciones\mdn\yari
    npm ERR! npm ERR! command failed
    npm ERR! npm ERR! command C:\Windows\system32\cmd.exe /d /s /c (husky || true) && yarn install:all && yarn install:all:npm
    npm ERR! npm ERR! $ find . -mindepth 2 -name 'yarn.lock' ! -wholename '/node_modules/' -print0 | xargs -n1 -0 sh -cx 'yarn --cwd $(dirname $0) install'
    npm ERR! npm ERR! [1/4] Resolving packages...
    npm ERR! npm ERR! success Already up-to-date.
    npm ERR! npm ERR! [1/4] Resolving packages...
    npm ERR! npm ERR! success Already up-to-date.
    npm ERR! npm ERR! [1/4] Resolving packages...
    npm ERR! npm ERR! success Already up-to-date.
    npm ERR! npm ERR! [1/4] Resolving packages...
    npm ERR! npm ERR! success Already up-to-date.
    npm ERR! npm ERR! $ find . -mindepth 2 -name 'package-lock.json' ! -wholename '/node_modules/' -print0 | xargs -n1 -0 sh -cx 'npm --prefix $(dirname $0) install'
    npm ERR! npm ERR! info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
    npm ERR! npm ERR! ++ dirname ./client/pwa/yarn.lock
    npm ERR! npm ERR! + yarn --cwd ./client/pwa install
    npm ERR! npm ERR! ++ dirname ./libs/locale-utils/yarn.lock
    npm ERR! npm ERR! + yarn --cwd ./libs/locale-utils install
    npm ERR! npm ERR! ++ dirname ./libs/pong/yarn.lock
    npm ERR! npm ERR! + yarn --cwd ./libs/pong install
    npm ERR! npm ERR! ++ dirname ./libs/slug-utils/yarn.lock
    npm ERR! npm ERR! + yarn --cwd ./libs/slug-utils install
    npm ERR! npm ERR! ++ dirname ./cloud-function/package-lock.json
    npm ERR! npm ERR! + npm --prefix ./cloud-function install
    npm ERR! npm ERR! npm ERR! code EPERM
    npm ERR! npm ERR! npm ERR! syscall symlink
    npm ERR! npm ERR! npm ERR! path D:\dev_20220602\Colaboraciones\mdn\yari\cloud-function\src\internal\constants
    npm ERR! npm ERR! npm ERR! dest D:\dev_20220602\Colaboraciones\mdn\yari\cloud-function\node_modules@yari-internal.constants-faBCTgS8
    npm ERR! npm ERR! npm ERR! errno -4048
    npm ERR! npm ERR! npm ERR! Error: EPERM: operation not permitted, symlink 'D:\dev_20220602\Colaboraciones\mdn\yari\cloud-function\src\internal\constants' -> 'D:\dev_20220602\Colaboraciones\mdn\yari\cloud-function\node_modules@yari-internal.constants-faBCTgS8'
    npm ERR! npm ERR! npm ERR! [Error: EPERM: operation not permitted, symlink 'D:\dev_20220602\Colaboraciones\mdn\yari\cloud-function\src\internal\constants' -> 'D:\dev_20220602\Colaboraciones\mdn\yari\cloud-function\node_modules@yari-internal.constants-faBCTgS8'] {
    npm ERR! npm ERR! npm ERR! errno: -4048,
    npm ERR! npm ERR! npm ERR! code: 'EPERM',
    npm ERR! npm ERR! npm ERR! syscall: 'symlink',
    npm ERR! npm ERR! npm ERR! path: 'D:\dev_20220602\Colaboraciones\mdn\yari\cloud-function\src\internal\constants',
    npm ERR! npm ERR! npm ERR! dest: 'D:\dev_20220602\Colaboraciones\mdn\yari\cloud-function\node_modules\@yari-internal\.constants-faBCTgS8'
    npm ERR! npm ERR! npm ERR! }
    npm ERR! npm ERR! npm ERR!
    npm ERR! npm ERR! npm ERR! The operation was rejected by your operating system.
    npm ERR! npm ERR! npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
    npm ERR! npm ERR! npm ERR! or that you lack permissions to access it.
    npm ERR! npm ERR! npm ERR!
    npm ERR! npm ERR! npm ERR! If you believe this might be a permissions issue, please double-check the
    npm ERR! npm ERR! npm ERR! permissions of the file and its containing directories, or try running
    npm ERR! npm ERR! npm ERR! the command again as root/Administrator.
    npm ERR! npm ERR!
    npm ERR! npm ERR! npm ERR! A complete log of this run can be found in: C:\Users\bgva\AppData\Local\npm-cache_logs\2024-03-18T00_33_23_365Z-debug-0.log
    npm ERR! npm ERR! error Command failed with exit code 123.
    npm ERR!
    npm ERR! npm ERR! A complete log of this run can be found in: C:\Users\bgva\AppData\Local\npm-cache_logs\2024-03-18T00_32_40_682Z-debug-0.log
    npm ERR! error Command failed with exit code 123.

npm ERR! A complete log of this run can be found in: C:\Users\bgva\AppData\Local\npm-cache_logs\2024-03-18T00_31_04_473Z-debug-0.log
error Command failed with exit code 123.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 123.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

`

URL

there are not URLs

Reproduction steps

  1. git clone https://github.com/Byron2016/yari.git --depth=1
  2. cd yari
  3. yarn

Expected behavior

all instalation process is doing without errors.

Actual behavior

there are a error in this step:
"install:all:npm": "find . -mindepth 2 -name 'package-lock.json' ! -wholename '**/node_modules/**' -print0 | xargs -n1 -0 sh -cx 'npm --prefix $(dirname $0) install'",

Device

Laptop

Browser

Chrome

Browser version

Stable

Operating system

Windows

Screenshot

No response

Anything else?

No response

Validations

@github-actions github-actions bot added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Mar 18, 2024
@Byron2016 Byron2016 changed the title yarn install on windows 10 running step "yarn install" for yari on windows 10 Mar 18, 2024
@caugner
Copy link
Contributor

caugner commented Mar 18, 2024

@Byron2016 Thanks for taking the time to report this issue. We don't actively support Git Bash on Windows and recommend using WSL2 instead.

Can you try adding the --no-bin-links parameter here between npm and --prefix and then run yarn install again:

"install:all:npm": "find . -mindepth 2 -name 'package-lock.json' ! -wholename '**/node_modules/**' -print0 | xargs -n1 -0 sh -cx 'npm --prefix $(dirname $0) install'",

@caugner caugner added p4 Not urgent, only if time allows windows and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Mar 18, 2024
@Byron2016
Copy link
Author

@caugner your suggestion about to add --no-bin-links parameter here between npm and --prefix and then run yarn install again doesn´t work, then I decided to install wsl in my windows 10, the problem did not appear with wsl.

@awxiaoxian2020
Copy link
Contributor

+1 here

@github-actions github-actions bot added the idle label May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idle p4 Not urgent, only if time allows windows
Projects
None yet
Development

No branches or pull requests

3 participants