6***@qq.com
6***@qq.com
  • 发布:2021-06-01 14:52
  • 更新:2023-07-20 14:27
  • 阅读:1568

正确使用了import导入组件,但还是报错Error: 组件 goods-sku 引用错误,仅支持 import 方式引入组件

分类:uni-app

14:47:27.667 Module build failed (from ./node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js):
14:47:27.667 Error: 组件 goods-sku 引用错误,仅支持 import 方式引入组件
14:47:27.671 at names.forEach (E:\HBuilderX.3.1.13.20210514\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\webpack-uni-mp-loader\lib\babel\util.js:37:13)
14:47:27.676 at Array.forEach (<anonymous>)
14:47:27.676 at parseComponents (E:\HBuilderX.3.1.13.20210514\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\webpack-uni-mp-loader\lib\babel\util.js:31:9)
14:47:27.679 at handleComponentsObjectExpression (E:\HBuilderX.3.1.13.20210514\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\webpack-uni-mp-loader\lib\babel\scoped-component-traverse.js:59:22)
14:47:27.680 at handleObjectExpression (E:\HBuilderX.3.1.13.20210514\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\webpack-uni-mp-loader\lib\babel\scoped-component-traverse.js:52:5)
14:47:27.684 at ExportDefaultDeclaration (E:\HBuilderX.3.1.13.20210514\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\webpack-uni-mp-loader\lib\babel\scoped-component-traverse.js:153:9)
14:47:27.689 at NodePath._call (E:\HBuilderX.3.1.13.20210514\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\path\context.js:55:20)
14:47:27.689 at NodePath.call (E:\HBuilderX.3.1.13.20210514\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\path\context.js:42:17)
14:47:27.695 at NodePath.visit (E:\HBuilderX.3.1.13.20210514\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\path\context.js:90:31)
14:47:27.701 at TraversalContext.visitQueue (E:\HBuilderX.3.1.13.20210514\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\context.js:112:16)
14:47:27.705 at TraversalContext.visitMultiple (E:\HBuilderX.3.1.13.20210514\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\context.js:79:17)
14:47:27.706 at TraversalContext.visit (E:\HBuilderX.3.1.13.20210514\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\context.js:138:19)
14:47:27.712 at Function.traverse.node (E:\HBuilderX.3.1.13.20210514\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\index.js:84:17)
14:47:27.713 at NodePath.visit (E:\HBuilderX.3.1.13.20210514\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\path\context.js:97:18)
14:47:27.717 at TraversalContext.visitQueue (E:\HBuilderX.3.1.13.20210514\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\context.js:112:16)
14:47:27.721 at TraversalContext.visitSingle (E:\HBuilderX.3.1.13.20210514\HBuilderX\plugins\uniapp-cli\node_modules\@babel\traverse\lib\context.js:84:19)
14:47:27.721 ERROR Build failed with errors.

2021-06-01 14:52 负责人:无 分享
已邀请:
1***@qq.com

1***@qq.com

组件可能导出有问题

lucky_w

lucky_w

楼主知道解决了吗

小金家的沐沐

小金家的沐沐

const workOrderProcessMaterial = defineAsyncComponent(() =>  
        import('../indoor/l.vue')  
);

组件 workOrderProcessContactInformation 引用错误,仅支持 import 方式引入组件
不能使用懒加载组件吗?

要回复问题请先登录注册