Yarn berry устанавливает node_modules

версия node.js: 16.14.0 версия пряжи: 3.1.1macOS: 11.6.4 (Big Sur)

Я настроил и продолжаю работать над проектом рабочей области пряжи. Я зафиксировал все файлы, включая .yarn, , в репозитории github.

Однако у меня возникла проблема после того, как я сменил свой компьютер.

Когда я попытался клонировать репо и выполнить yarn installс моего настольного компьютера он удалил .pnp.cjsа также .pnp.loader.mjsфайлы и установил .

Другие коллеги не сталкиваются с этой проблемой, как и на другом моем ноутбуке. Node и другие версии одинаковы.

Я пытался удалить и переустановить репозиторий несколько раз, но результаты были такими же.

Я знаю, что node_modules можно установить, несмотря на использование Yarn berry, когда зависимости включают двоичный файл. Но я не думаю, что это так.

Ниже приведено сообщение оболочки, когда node_modulesустановлен.

      ➤ 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

1 ответ

У вас есть .yarnrc.ymlфайл в одном из родительских каталогов с nodeLinker: node-modulesвариант внутри него (может быть, в домашней папке вашего пользователя?), найдите этот файл и удалите его.

Другие вопросы по тегам