Closed arcanis closed 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.
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
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
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
Fixes #8793 Fixes #8965 Fixes #9005
Punycode is now embed within the bundle, as it has been deprecated by Node.js and will be removed in a future version.
A message will be displayed when Yarn 1.22 notices that the local project has a
package.json
file referencing a non-1.x Yarn release. The message will explain that the project is intended to be used with Corepack.I removed the
yarn-error.log
generation. Given that we don't process non-critical 1.x bug reports, they are now mostly an annoyance.The
yarn set version x.y.z
command will now install the exactx.y.z
version (prior to this change it used to first install the latest version, and only in a second step would it downgrade tox.y.z
; this was causing issues when we bump the minimal Node.js version we support, as runningyarn set version 3.6.4
wouldn't work on Node 16).Prevents crashes when reading from an empty
.yarnrc.yml
file.