出错:
warning Pattern ["@umijs/plugin-model@^2.5.6"] is trying to unpack in the same destination "/Users/Admin/Library/Caches/Yarn/v6/npm-@umijs-plugin-model-2.5.6-1eec24000d608375d0790fb6713a50d7ee7b5153-integrity/node_modules/@umijs/plugin-model" as pattern ["@umijs/plugin-model@2.5.6"]. This could result in non-deterministic behavior, skipping.
[4/5] 🔗 Linking dependencies...
warning "@ant-design/pro-descriptions > @ant-design/pro-field@1.9.4" has incorrect peer dependency "react@^16.x".
warning " > @ant-design/pro-form@1.15.4" has incorrect peer dependency "react@^16.x".
warning "@ant-design/pro-descriptions > @ant-design/pro-skeleton@1.0.0-beta.12" has incorrect peer dependency "react@^16.x".
...
[5/5] 🔨 Building fresh packages...
success Saved lockfile.
success Saved 1 new dependency.
info Direct dependencies
└─ @umijs/plugin-model@2.5.6
info All dependencies
└─ @umijs/plugin-model@2.5.6
$ umi g tmp
plugin @umijs/plugin-model is already registered by /Users/Admin/antd5/node_modules/@umijs/plugin-model/lib/index.js, plugin from /Users/Admin/antd5/node_modules/@umijs/plugin-model/lib/index.js register failed.
Error: plugin @umijs/plugin-model is already registered by /Users/Admin/antd5/node_modules/@umijs/plugin-model/lib/index.js, plugin from /Users/Admin/antd5/node_modules/@umijs/plugin-model/lib/index.js register failed.
at Service.registerPlugin (/Users/Admin/antd5/node_modules/@umijs/core/lib/Service/Service.js:457:13)
at /Users/Admin/antd5/node_modules/@umijs/core/lib/Service/Service.js:436:14
at Generator.next ()
at asyncGeneratorStep (/Users/Admin/antd5/node_modules/@umijs/core/lib/Service/Service.js:108:103)
at _next (/Users/Admin/antd5/node_modules/@umijs/core/lib/Service/Service.js:110:194)
at /Users/Admin/antd5/node_modules/@umijs/core/lib/Service/Service.js:110:364
at new Promise ()
at /Users/Admin/antd5/node_modules/@umijs/core/lib/Service/Service.js:110:97
at Service.initPlugin (/Users/Admin/antd5/node_modules/@umijs/core/lib/Service/Service.js:442:7)
at /Users/Admin/antd5/node_modules/@umijs/core/lib/Service/Service.js:317:22
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
第一步: $ yarn create umi myapp 选择 ❯ ant-design-pro ❯ Pro V5
第二步:add plugin-model $ yarn add @umijs/plugin-model --dev
出错: warning Pattern ["@umijs/plugin-model@^2.5.6"] is trying to unpack in the same destination "/Users/Admin/Library/Caches/Yarn/v6/npm-@umijs-plugin-model-2.5.6-1eec24000d608375d0790fb6713a50d7ee7b5153-integrity/node_modules/@umijs/plugin-model" as pattern ["@umijs/plugin-model@2.5.6"]. This could result in non-deterministic behavior, skipping. [4/5] 🔗 Linking dependencies... warning "@ant-design/pro-descriptions > @ant-design/pro-field@1.9.4" has incorrect peer dependency "react@^16.x". warning " > @ant-design/pro-form@1.15.4" has incorrect peer dependency "react@^16.x". warning "@ant-design/pro-descriptions > @ant-design/pro-skeleton@1.0.0-beta.12" has incorrect peer dependency "react@^16.x". ...
[5/5] 🔨 Building fresh packages... success Saved lockfile. success Saved 1 new dependency. info Direct dependencies └─ @umijs/plugin-model@2.5.6 info All dependencies └─ @umijs/plugin-model@2.5.6 $ umi g tmp plugin @umijs/plugin-model is already registered by /Users/Admin/antd5/node_modules/@umijs/plugin-model/lib/index.js, plugin from /Users/Admin/antd5/node_modules/@umijs/plugin-model/lib/index.js register failed. Error: plugin @umijs/plugin-model is already registered by /Users/Admin/antd5/node_modules/@umijs/plugin-model/lib/index.js, plugin from /Users/Admin/antd5/node_modules/@umijs/plugin-model/lib/index.js register failed. at Service.registerPlugin (/Users/Admin/antd5/node_modules/@umijs/core/lib/Service/Service.js:457:13) at /Users/Admin/antd5/node_modules/@umijs/core/lib/Service/Service.js:436:14 at Generator.next ()
at asyncGeneratorStep (/Users/Admin/antd5/node_modules/@umijs/core/lib/Service/Service.js:108:103)
at _next (/Users/Admin/antd5/node_modules/@umijs/core/lib/Service/Service.js:110:194)
at /Users/Admin/antd5/node_modules/@umijs/core/lib/Service/Service.js:110:364
at new Promise ()
at /Users/Admin/antd5/node_modules/@umijs/core/lib/Service/Service.js:110:97
at Service.initPlugin (/Users/Admin/antd5/node_modules/@umijs/core/lib/Service/Service.js:442:7)
at /Users/Admin/antd5/node_modules/@umijs/core/lib/Service/Service.js:317:22
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
清掉项目中的node_modules,和/Users/Admin/Library/Caches/Yarn/v6的缓冲再试还是一样。 不知什么原因?