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

[BUG]➤ Error: resize-observer-polyfill@npm:^1.5.1: No candidates found #3695

Open
pllizining opened this issue Mar 27, 2023 · 7 comments
Open
Labels
bug Something isn't working dependencies Pull requests that update a dependency file

Comments

@pllizining
Copy link

yarn install Report an error
Error message:

➤ YN0001: │ Error: resize-observer-polyfill@npm:^1.5.1: No candidates found
    at ge (C:\Users\ning\AppData\Local\node\corepack\yarn\3.5.0\yarn.js:439:7784)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
➤ YN0000: └ Completed in 52s 622ms
➤ YN0000: Failed with errors in 52s 632ms

Build failure

@pllizining pllizining added bug Something isn't working untriaged labels Mar 27, 2023
@Abyl10
Copy link

Abyl10 commented Mar 27, 2023

Hello, this is worked for me! The error message suggests that there were no compatible versions found for the "resize-observer-polyfill" package with a version constraint of "^1.5.1".

There are a few potential solutions you could try:

  1. Update the version constraint in your package.json file to a compatible version of resize-observer-polyfill.
  2. Remove the version constraint for resize-observer-polyfill in your package.json file and run "yarn install" again to let Yarn install the latest compatible version of the package.
  3. Clear your Yarn cache and try running yarn install again:
yarn cache clean
yarn install

If none of the above solutions work, you may want to check if there are any compatibility issues with other dependencies or if there are any issues with the registry you are using.

@pllizining
Copy link
Author

您好,这对我有用!错误消息表明没有找到版本约束为“^1.5.1”的“resize-observer-polyfill”包的兼容版本。

您可以尝试一些可能的解决方案:

  1. 将 package.json 文件中的版本约束更新为兼容的resize-observer-polyfill.
  2. resize-observer-polyfill删除package.json 文件中的版本约束,然后再次运行“yarn install”,让 Yarn 安装包的最新兼容版本。
  3. 清除 Yarn 缓存并yarn install再次尝试运行:
yarn cache clean
yarn install

如果上述解决方案均无效,您可能需要检查其他依赖项是否存在任何兼容性问题,或者您使用的注册表是否存在任何问题。

依然无法解决。
我尝试使用通git下载项目,依然会报这个错。
我尝试使用yarn osd bootstrap 这个命令
会报另一个错:Internal Error: opensearch-dashboards@workspace:.: This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile
但是我使用yarn install无法又会陷入这个循环。

@joshuarrrr
Copy link
Member

For some historical context, see #1252 (comment) and #1370 (comment)

@AMoo-Miki Can you weigh in here on proposed next steps?

@joshuarrrr joshuarrrr added dependencies Pull requests that update a dependency file and removed untriaged labels Mar 27, 2023
@xiaodizi
Copy link

这个问题我解决了,我是个java开发,很少做npm相关的部署。也是尝试了很久。
1、需要用npm 全局安装 resize-observer-polyfill
npm install -g resize-observer-polyfill

如果前期出现
Internal Error: Cannot find module 'mkdirp'
这个错误,也要全局安装 mkdirp。

2、安装 完 resize-observer-polyfill ,会有版本的提示,比如
`$ npm install -g resize-observer-polyfill

  • [email protected]
    added 1 package from 1 contributor in 0.329s`
    我这个就是 1.5.1 ,
    然后需要在 yarn.lock 文件修改版本。我搜了一下,其他地方都是1.5.1 ,只有下边如图的地方是1.5.2

image

修改了这些应该就可以正常进行yarn install了。如果还有其他问题,
也可以发出来,一起研究一下。

@bernardodesousa
Copy link

I am experiencing the same error trying yarn install in Ubuntu 20.04 on WSL. It's the first time I interact with yarn, so I'm a bit lost here. I followed the official instructions to install yarn with Node LTS, running corepack enable then corepack prepare yarn@stable --activate. Am I missing something?

@bernardodesousa
Copy link

I verified that this is not a problem with yarn nor with the resize-observer-polyfill package. I created a new yarn project and added the package to it. It got installed without a problem.

@AMoo-Miki
Copy link
Collaborator

resize-observer-polyfill@^1.5.1 is marked to resolve to @4lolo/[email protected] in tha lockfile.

OpenSearch-Dashboards/yarn.lock

Lines 15320 to 15322 in 5ffb3d8

resize-observer-polyfill@^1.5.1:
version "1.5.2"
resolved "https://registry.yarnpkg.com/@4lolo/resize-observer-polyfill/-/resize-observer-polyfill-1.5.2.tgz#58868fc7224506236b5550d0c68357f0a874b84b"

Make sure you use yarn bootstrap for setting up the project (not install) and that the yarn.lock file is unmodified. Do not use npm as this project cannot be built with npm.

If you continue to have problems, please provide the output of each of these commands:

node -v
yarn -v
npm -v

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies Pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests

6 participants