Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

飞书小程序编译报错 #1772

Closed
Godsea opened this issue Mar 23, 2024 · 2 comments
Closed

飞书小程序编译报错 #1772

Godsea opened this issue Mar 23, 2024 · 2 comments
Assignees

Comments

@Godsea
Copy link

Godsea commented Mar 23, 2024

Taro UI 版本信息

v3.3.0

问题描述

使用飞书小程序编译报错

复现步骤

1.taro init myApp
2.选择使用 taro-ui 的模板
3.使用Taro-ui示例
4.npm run dev:lark

复现代码

import { View } from "@tarojs/components";
import { useLoad } from "@tarojs/taro";
import "./index.scss";
import { AtButton } from "taro-ui";

export default function Index() {
  useLoad(() => {
    console.log("Page loaded.");
  });

  return (
    <View className="index">
      <AtButton type="primary">按钮文案</AtButton>
    </View>
  );
}

报错信息

[ERROR] No matching export in "node_modules/@tarojs/plugin-platform-lark/dist/components-react.js" for import "OpenData"

    node_modules/taro-ui/dist/index.esm.js:2:21:
      2 │ import { View, Text, OpenData, Image, Button, Switch, ScrollView, Form, Label, Input, Textarea, Slider, MovableArea, MovableView, Swiper, SwiperItem, Picker } from '@tarojs/components';

系统信息

Taro CLI 3.6.25 environment info:
System:
OS: Windows 10 10.0.19045
Binaries:
Node: 16.20.2 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.22 - C:\Program Files\nodejs\yarn.CMD
npm: 8.19.4 - C:\Program Files\nodejs\npm.CMD
npmPackages:
@tarojs/cli: 3.6.25 => 3.6.25
@tarojs/components: 3.6.25 => 3.6.25
@tarojs/helper: 3.6.25 => 3.6.25
@tarojs/plugin-framework-react: 3.6.25 => 3.6.25
@tarojs/plugin-platform-h5: 3.6.25 => 3.6.25
@tarojs/plugin-platform-weapp: 3.6.25 => 3.6.25
@tarojs/runtime: 3.6.25 => 3.6.25
@tarojs/shared: 3.6.25 => 3.6.25
@tarojs/taro: 3.6.25 => 3.6.25
@tarojs/taro-loader: 3.6.25 => 3.6.25
@tarojs/webpack5-runner: 3.6.25 => 3.6.25
babel-preset-taro: 3.6.25 => 3.6.25
eslint-config-taro: 3.6.25 => 3.6.25
taro-ui: ^3.3.0 => 3.3.0

补充信息

Copy link

taro-ui-bot bot commented Mar 23, 2024

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

@robinv8 robinv8 self-assigned this Mar 25, 2024
@robinv8
Copy link
Collaborator

robinv8 commented Apr 2, 2024

修改 webpack5 配置,修改如下:

 compiler: {
    type: 'webpack5',
    prebundle: {
      exclude: ['taro-ui']
    }
  },

详情:#1726

@robinv8 robinv8 closed this as completed Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants