Replies: 1 comment 4 replies
-
能看看具体是哪个dependencies没有main文件吗? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
按照官网上进行一一安装
npm install --save @formily/core
npm install --save @formily/react
npm install --save antd moment @formily/antd
其他项目依赖信息
"@formily/antd": "^2.0.0-beta.36",
"@formily/core": "^2.0.0-beta.36",
"@formily/react": "^2.0.0-beta.36",
"antd": "^3.19.5",
"dva": "^2.6.0-beta.6",
"moment": "^2.29.1",
"react": "^16.8.6",
"react-dom": "^16.8.6"
完成的错误提示
formily yarn start
yarn run v1.21.1
warning ../../../package.json: No license field
$ umi dev
Building dll...
✖ Webpack
Compiled with some errors in 16.99s
ERROR Failed to compile with 3 errors
This dependency was not found:
To install it, you can run: npm install --save antd/es/space/style/index
ERROR CODE ERR_WEBPACK_DLL_MODULE_NOT_FOUND
DETAILS
错误原因
构建 dll 文件时出错了,由于 dependencies 下的依赖会全部被打到 dll 里,所以报错可能有以下原因:
解决方案
让不该打到 dll 的不被打到 dll 里,有几个解决方案:
比如:
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Beta Was this translation helpful? Give feedback.
All reactions