mdn / yari

The platform code behind MDN Web Docs
Mozilla Public License 2.0
1.18k stars 501 forks source link

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

Open Byron2016 opened 6 months ago

Byron2016 commented 6 months ago

Summary

I use:

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

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

caugner commented 6 months ago

@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:

https://github.com/mdn/yari/blob/e8ec3d3b888950cc4a3d052241f93216a5b5d9f5/package.json#L34

Byron2016 commented 6 months ago

@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 commented 6 months ago

+1 here