You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An npm image source exists and its address is http://ip:port/npm/. Run the following command to set the registry: yarn config set registry http://ip:port/npm/ .
Then I installed pm2 with the following command: yarn global add pm2
The installation fails. The following error information is displayed: error An unexpected error occurred: "http://ip/npm/chalk/-/chalk-3.0.0.tgz: Request failed \"404 Not Found\"".
From the above error message, it can be seen that I have set the port, but the yarn does not take effect.
Yarn should not obtain resources from http://ip/npm/chalk/-/chalk-3.0.0.tgz. Instead, it should obtain resources from http://ip:port/npm/chalk/-/chalk-3.0.0.tgz. The port setting does not take effect.
Then I use Chrome to visit http://ip:port/npm/chalk/-/chalk-3.0.0.tgz address, normally downloaded the installation package.
This proves that there is no problem with the server, yarn has a bug. My yarn version is 1.22.19
To reproduce
Create a Dockerfile and write the following content:
FROM node:20.11-alpine3.19 AS base
RUN yarn config set registry http://ip:port/npm/
RUN yarn global add pm2
docker build . -t test
Error is as follows error An unexpected error occurred: "http://ip/npm/chalk/-/chalk-3.0.0.tgz: Request failed \"404 Not Found\"".
Environment
yarn dlx -q envinfo --preset jest
yarn run v1.22.19
error Command "dlx" not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Additional context
No response
The text was updated successfully, but these errors were encountered:
Self-service
Describe the bug
An npm image source exists and its address is http://ip:port/npm/. Run the following command to set the registry:
yarn config set registry http://ip:port/npm/
.Then I installed pm2 with the following command:
yarn global add pm2
The installation fails. The following error information is displayed:
error An unexpected error occurred: "http://ip/npm/chalk/-/chalk-3.0.0.tgz: Request failed \"404 Not Found\"".
From the above error message, it can be seen that I have set the port, but the yarn does not take effect.
Yarn should not obtain resources from http://ip/npm/chalk/-/chalk-3.0.0.tgz. Instead, it should obtain resources from http://ip:port/npm/chalk/-/chalk-3.0.0.tgz. The port setting does not take effect.
Then I use Chrome to visit http://ip:port/npm/chalk/-/chalk-3.0.0.tgz address, normally downloaded the installation package.
This proves that there is no problem with the server, yarn has a bug.
My yarn version is 1.22.19
To reproduce
docker build . -t test
error An unexpected error occurred: "http://ip/npm/chalk/-/chalk-3.0.0.tgz: Request failed \"404 Not Found\"".
Environment
Additional context
No response
The text was updated successfully, but these errors were encountered: