umijs / umi-plugin-block-dev

A umi plugin for develop a umi block with umi.
MIT License
14 stars 2 forks source link

使用 layout 参数时报错 #11

Open sssession opened 4 years ago

sssession commented 4 years ago

报错信息如下:

 ERROR  Failed to compile with 6 errors                                                                                                                                                                                          10:56:16

These dependencies were not found:

* @ant-design/pro-layout in ./node_modules/umi-plugin-block-dev/layouts/ant-design-pro/index.js
* antd in ./node_modules/umi-plugin-block-dev/layouts/ant-design-pro/HeaderDropdown/index.jsx, ./node_modules/umi-plugin-block-dev/layouts/ant-design-pro/SelectLang/index.jsx
* classnames in ./node_modules/umi-plugin-block-dev/layouts/ant-design-pro/HeaderDropdown/index.jsx, ./node_modules/umi-plugin-block-dev/layouts/ant-design-pro/SelectLang/index.jsx
* umi-plugin-react/locale in ./node_modules/umi-plugin-block-dev/layouts/ant-design-pro/SelectLang/index.jsx

To install them, you can run: npm install --save @ant-design/pro-layout antd classnames umi-plugin-react/locale

发现 @ant-design/pro-layout 是作为 devDependencies 安装在 umi-plugin-block-dev,安装 umi-plugin-block-dev 时不会安装 devDependencies 依赖。

yutingzhao1991 commented 4 years ago

应该算是 peerDependencies,需要手动安装下 @ant-design/pro-layout

sssession commented 4 years ago

应该算是 peerDependencies,需要手动安装下 @ant-design/pro-layout

看到有个关于这个的 PR https://github.com/umijs/umi-plugin-block-dev/pull/10 没合进去。😂

如果确定是 peerDependencies 的话可以更新一下文档。 😘

sssession commented 4 years ago

umi-plugin-react 也需要手动安装下