为什么在我的项目中,yarn install 命令完成时出现错误?

问题描述 投票:0回答:2

纱线版本3.2.4 节点版本v18.12.0

运行后

yarn install
我收到以下错误:

➤ YN0000: ┌ Fetch step
➤ YN0013: │ yargs@npm:17.6.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yarn-install@npm:1.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yauzl@npm:2.10.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yup@npm:0.32.11 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ zip-stream@npm:4.1.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0000: └ Completed in 0s 488ms
➤ YN0000: ┌ Link step
➤ YN0000: │ ESM support for PnP uses the experimental loader API and is therefore experimental
➤ YN0007: │ chromedriver@npm:107.0.3 must be built because it never has been before or the last one failed
➤ YN0007: │ es5-ext@npm:0.10.62 must be built because it never has been before or the last one failed
➤ YN0000: └ Completed in 0s 738ms
cucumber yarnpkg webdriver-io
2个回答
0
投票

这些错误代码完全没问题,实际上都不是错误。它们更像是具有 INFO 级别的日志。如果是错误,您可能已经看到带有错误前缀的消息。您可以在此处阅读有关这些错误代码的更多信息。


0
投票

与OP的警告消息类似,我也收到了一些错误消息,如下所示:

YN0013: │ extsprintf@npm:1.4.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0001: │ Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close
    at PassThrough.onclose (node:internal/streams/end-of-stream:154:30)
    at PassThrough.emit (node:events:518:28)
    at emitCloseNT (node:internal/streams/destroy:147:10)
    at process.processTicksAndRejections (node:internal/process/task_queues:81:21)

感谢@Raju的足智多谋的链接,看起来

YN0001
“通常不应该发生”,所以我想我可能想升级我的纱线版本,这是
3.0.1

您可以通过运行

yarn set version stable
来更新您的纱线版本。

然后当我运行

yarn
时,虽然显示了其他警告信息,但至少完成了!

yarn                                                                                                               ─╯
➤ YN0048: Automatically removed core plugins that are now builtins 👍

➤ YN0000: · Yarn 4.1.1
➤ YN0000: ┌ Resolution step
➤ YN0085: │ + @babel/core@npm:7.24.0, @babel/plugin-transform-typescript@npm:7.23.6, and 1846 more.
➤ YN0000: └ Completed in 7s 971ms
➤ YN0000: ┌ Post-resolution validation
➤ YN0060: │ @typescript-eslint/eslint-plugin is listed by your project with version 5.62.0, which doesn't satisfy what eslint-config-react-app (pc2925) requests (^4.0.0).
➤ YN0060: │ @typescript-eslint/parser is listed by your project with version 5.62.0, which doesn't satisfy what eslint-config-react-app (p485af) requests (^4.0.0).
➤ YN0060: │ eslint-plugin-flowtype is listed by your project with version 4.7.0, which doesn't satisfy what eslint-config-react-app (p709f8) requests (^5.2.0).
➤ YN0060: │ react is listed by your project with version 18.2.0, which doesn't satisfy what @storybook/react (p1eae0) and other dependencies request (^16.8.0 || ^17.0.1).
➤ YN0060: │ react-dom is listed by your project with version 18.2.0, which doesn't satisfy what @storybook/react (p8018f) and other dependencies request (^16.8.0 || ^17.0.1).
➤ YN0002: │ primitives@workspace:. doesn't provide @testing-library/dom (p1178b), requested by @testing-library/user-event.
➤ YN0002: │ primitives@workspace:. doesn't provide require-from-string (p2e43f), requested by @storybook/react.
➤ YN0002: │ primitives@workspace:. doesn't provide webpack (pab42c), requested by babel-loader.
➤ YN0086: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code.
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0013: │ 1812 packages were added to the project (+ 625.92 MiB).
➤ YN0000: └ Completed in 8s 614ms
➤ YN0000: ┌ Link step
➤ YN0007: │ cypress@npm:8.7.0 must be built because it never has been before or the last one failed
➤ YN0007: │ husky@npm:4.3.8 must be built because it never has been before or the last one failed
➤ YN0007: │ core-js@npm:3.36.0 must be built because it never has been before or the last one failed
➤ YN0007: │ core-js-pure@npm:3.36.0 must be built because it never has been before or the last one failed
➤ YN0007: │ msgpackr-extract@npm:3.0.2 must be built because it never has been before or the last one failed
➤ YN0007: │ lmdb@npm:2.2.4 must be built because it never has been before or the last one failed
➤ YN0000: └ Completed in 40s 672ms
➤ YN0000: · Done with warnings in 57s 426ms
© www.soinside.com 2019 - 2024. All rights reserved.