从yarn 3(来自全新的存储库)安装的新软件包不会填充node_modules文件夹

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

最近我使用yarn 1.22 遇到了包问题。 得到了使用yarn 3的建议,我在现有视图中做了它,yarn 3确实运行得更好。

节点 v16.16.0,MacOS

所以我提交了新的package.json和yarn.lock并想在新视图中测试它。 步骤是:

git clone
cd myApp
yarn -v // still 1.22
yarn set version 3.6.4
yarn -v // now 3.6.4
yarn install
no errors, but no node_modules generated in the end.

这是“yarn install”日志

➤ YN0000: ┌ Resolution step
➤ YN0002: │ myApp@workspace:. doesn't provide @types/express (pd07d1), requested by express-jwt-authz
➤ YN0000: │ 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: │ yallist@npm:4.0.0 can't be found in the cache and will be fetched f
➤ YN0013: │ yaml@npm:2.3.1 can't be found in the cache and will be fetched from
➤ YN0013: │ yargs-parser@npm:21.1.1 can't be found in the cache and will be fet
➤ YN0013: │ yargs@npm:17.6.2 can't be found in the cache and will be fetched fr
➤ YN0013: │ yocto-queue@npm:0.1.0 can't be found in the cache and will be fetch
➤ YN0000: └ Completed in 1s 829ms
➤ YN0000: ┌ Link step
➤ YN0000: │ ESM support for PnP uses the experimental loader API and is therefore experimental
➤ YN0007: │ aws-crt@npm:1.18.0 must be built because it never has been before or the last one failed
➤ YN0007: │ core-js-pure@npm:3.26.1 must be built because it never has been before or the last one failed
➤ YN0007: │ @datadog/native-appsec@npm:4.0.0 must be built because it never has been before or the last one failed
➤ YN0007: │ @datadog/native-metrics@npm:2.0.0 must be built because it never has been before or the last one failed
➤ YN0007: │ @datadog/pprof@npm:3.2.0 must be built because it never has been before or the last one failed
➤ YN0007: │ protobufjs@npm:7.2.5 must be built because it never has been before or the last one failed
➤ YN0007: │ cpu-features@npm:0.0.9 must be built because it never has been before or the last one failed
➤ YN0007: │ dd-trace@npm:4.16.0 must be built because it never has been before or the last one failed
➤ YN0007: │ ssh2@npm:1.14.0 must be built because it never has been before or the last one failed
➤ YN0000: └ Completed in 17s 368ms
➤ YN0000: Done with warnings in 19s 392ms

有什么建议吗?

yarnpkg
1个回答
0
投票

ok .yarnrc.yaml 需要这一行 nodeLinker:节点模块

现在真正的解决方案是,yarn 3 应该显示正确的消息,指示 yaml 文件更改。

此外,js 社区需要更多支持的人,而不是成为混蛋。 我们需要 ppl 互相帮助,而不是不断更改配置并在 ppl 上进行测试。我看到一些所谓的极客让事情变得更糟的趋势,并喜欢看到其他人受苦。

© www.soinside.com 2019 - 2024. All rights reserved.