yarnpkg / yarn

The 1.x line is frozen - features and bugfixes now happen on https://github.com/yarnpkg/berry
https://classic.yarnpkg.com
Other
41.37k stars 2.72k forks source link

Hotfixes for the 1.22.20 #9009

Closed arcanis closed 7 months ago

arcanis commented 7 months ago

Fixes #8793 Fixes #8965 Fixes #9005

voslartomas commented 7 months ago

@arcanis Hello it seems like latest version of yarn brings regression, it cannot find nearest package.json file. So having package.json in root of the project and trying to run yarn in any subfolder will raise error like this

Error: Couldn't find a package.json file in 

Downgrade to v1.20.19 resolves this issue.

arcanis commented 7 months ago

Can you give me a reproduction? According to your post the following should crash, but doesn't for me:

cd $(mktemp -d) && yarn init -y && yarn install && mkdir foo && cd foo && yarn install
Cyberboss commented 7 months ago

Dockerfile

FROM mcr.microsoft.com/dotnet/sdk:6.0-bookworm-slim AS build

# install node and npm
# replace shell with bash so we can source files
RUN curl --silent -o- https://raw.githubusercontent.com/creationix/nvm/v0.39.1/install.sh | sh

ENV NODE_VERSION 20.5.1

ENV NVM_DIR /root/.nvm
ENV NODE_PATH $NVM_DIR/v$NODE_VERSION/lib/node_modules
ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH

RUN . $NVM_DIR/nvm.sh \
    && nvm install $NODE_VERSION \
    && nvm use $NODE_VERSION \
  && npx --yes yarn add svg-to-ico@1.0.14 svg2img@1.0.0-beta.2
Cyberboss commented 7 months ago

https://github.com/yarnpkg/yarn/issues/9011#issuecomment-1810723680

liuxingbaoyu commented 7 months ago

Sorry for bothering.

https://github.com/yarnpkg/yarn/issues/7939 It would be great if this could be fixed as well, this issue causes yarn1 to be completely unavailable on some Windows users. Ref: https://github.com/typescript-eslint/typescript-eslint/issues/6150