Critical dependency: the request of a dependency is an expression

刘超 10天前 ⋅ 98 阅读   编辑

一、描述

  执行npm run build,报如下错误

WARNING in ./node_modules/yargs-parser/index.js 586:21-48
Critical dependency: the request of a dependency is an expression
 @ ./node_modules/@umijs/utils/lib/index.js
 @ ./node_modules/umi/lib/cjs.js
 @ ./node_modules/umi/index.js
 @ ./app/containers/Index/index.tsx
 @ ./app/routes.ts
 @ ./app/app.tsx
 @ multi E:/Workspace/Project/node_modules/react-app-polyfill/ie11.js ./app/app.tsx

二、分析

  1、

三、解决方法

  1、

四、参考文章
  1、https://blog.csdn.net/u013727805/article/details/96025081
  2、https://www.cnblogs.com/fanqshun/p/10073493.html
  3、https://github.com/webpack/webpack/issues/196
  4、https://github.com/webpack/webpack-dev-server/issues/212


注意:本文归作者所有,未经作者允许,不得转载

全部评论: 0

    我有话说: