gpt4 book ai didi

node-modules - yarn berry 安装node_modules

转载 作者:行者123 更新时间:2023-12-02 15:57:45 26 4
gpt4 key购买 nike

node.js 版本:16.14.0 yarn 版本:3.1.1macOS:11.6.4(大苏尔)

我建立并继续从事 yarn workspace 项目。我在 github repo 上提交了所有文件,包括 .yarn.pnp.cjs.pnp.loader.mjs

但是,我在更换电脑后遇到了问题。

当我尝试从我的桌面计算机克隆存储库并执行 yarn install 时,它删除了 .pnp.cjs.pnp.loader.mjs 文件并安装了 node_modules

其他同事没有遇到这个问题,在我的另一台笔记本电脑上也没有。 Node等其他版本相同。

我多次尝试删除并重新安装 repo,但结果也是一样。

我知道当依赖项包含二进制文件时,尽管使用 Yarn berry,也可以安装 node_modules。但我认为情况并非如此。

下面是安装 node_modules 时的 shell 消息。

➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed in 0s 353ms
➤ YN0000: ┌ Link step
➤ YN0076: │ @swc/core-android-arm-eabi@npm:1.2.126 The darwin-x64 architecture is incompatible with this module, link skipped.
➤ YN0076: │ @swc/core-android-arm64@npm:1.2.126 The darwin-x64 architecture is incompatible with this module, link skipped.
➤ YN0076: │ @swc/core-darwin-arm64@npm:1.2.126 The darwin-x64 architecture is incompatible with this module, link skipped.
➤ YN0076: │ @swc/core-freebsd-x64@npm:1.2.126 The darwin-x64 architecture is incompatible with this module, link skipped.
➤ YN0076: │ @swc/core-linux-arm-gnueabihf@npm:1.2.126 The darwin-x64 architecture is incompatible with this module, link skipped.
➤ YN0076: │ @swc/core-linux-arm64-gnu@npm:1.2.126 The darwin-x64 architecture is incompatible with this module, link skipped.
➤ YN0076: │ @swc/core-linux-arm64-musl@npm:1.2.126 The darwin-x64 architecture is incompatible with this module, link skipped.
➤ YN0076: │ @swc/core-linux-x64-gnu@npm:1.2.126 The darwin-x64 architecture is incompatible with this module, link skipped.
➤ YN0076: │ @swc/core-linux-x64-musl@npm:1.2.126 The darwin-x64 architecture is incompatible with this module, link skipped.
➤ YN0076: │ @swc/core-win32-arm64-msvc@npm:1.2.126 The darwin-x64 architecture is incompatible with this module, link skipped.
➤ YN0076: │ @swc/core-win32-ia32-msvc@npm:1.2.126 The darwin-x64 architecture is incompatible with this module, link skipped.
➤ YN0076: │ @swc/core-win32-x64-msvc@npm:1.2.126 The darwin-x64 architecture is incompatible with this module, link skipped.
➤ YN0076: │ @swc/core-android-arm-eabi@npm:1.2.133 The darwin-x64 architecture is incompatible with this module, link skipped.
➤ YN0076: │ @swc/core-android-arm64@npm:1.2.133 The darwin-x64 architecture is incompatible with this module, link skipped.
➤ YN0076: │ @swc/core-darwin-arm64@npm:1.2.133 The darwin-x64 architecture is incompatible with this module, link skipped.
➤ YN0076: │ @swc/core-freebsd-x64@npm:1.2.133 The darwin-x64 architecture is incompatible with this module, link skipped.
➤ YN0076: │ @swc/core-linux-arm-gnueabihf@npm:1.2.133 The darwin-x64 architecture is incompatible with this module, link skipped.
➤ YN0076: │ @swc/core-linux-arm64-gnu@npm:1.2.133 The darwin-x64 architecture is incompatible with this module, link skipped.
➤ YN0076: │ @swc/core-linux-arm64-musl@npm:1.2.133 The darwin-x64 architecture is incompatible with this module, link skipped.
➤ YN0076: │ @swc/core-linux-x64-gnu@npm:1.2.133 The darwin-x64 architecture is incompatible with this module, link skipped.
➤ YN0076: │ @swc/core-linux-x64-musl@npm:1.2.133 The darwin-x64 architecture is incompatible with this module, link skipped.
➤ YN0076: │ @swc/core-win32-arm64-msvc@npm:1.2.133 The darwin-x64 architecture is incompatible with this module, link skipped.
➤ YN0076: │ @swc/core-win32-ia32-msvc@npm:1.2.133 The darwin-x64 architecture is incompatible with this module, link skipped.
➤ YN0076: │ @swc/core-win32-x64-msvc@npm:1.2.133 The darwin-x64 architecture is incompatible with this module, link skipped.
➤ YN0000: └ Completed in 8s 368ms
➤ YN0000: Done with warnings in 9s 31ms

我在另一台运行良好的计算机上尝试时收到了不同的消息。

➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed in 0s 428ms
➤ YN0000: ┌ Link step
➤ YN0000: │ ESM support for PnP uses the experimental loader API and is therefore experimental
➤ YN0000: └ Completed
➤ YN0000: Done with warnings in 0s 841ms

最佳答案

您在父目录之一中有 .yarnrc.yml 文件,其中包含 nodeLinker: node-modules 选项(可能在您的用户主文件夹中?),找到这个文件并将其删除。

关于node-modules - yarn berry 安装node_modules,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71206235/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com