NervJS / taro

开放式跨端跨框架解决方案,支持使用 React/Vue/Nerv 等框架来开发微信/京东/百度/支付宝/字节跳动/ QQ 小程序/H5/React Native 等应用。 https://taro.zone/
https://docs.taro.zone/
Other
35.4k stars 4.78k forks source link

快手小程序编译原生组件报错 #14824

Open saralee2012 opened 10 months ago

saralee2012 commented 10 months ago

相关平台

快手小程序

复现仓库

https://github.com/saralee2012/taro-sample-kwai.git

使用框架: React

复现步骤

pages/index/index中引入快手原生组件,编译报错

期望结果

编译通过页面正常打开

实际结果

编译报错

环境信息

👽 Taro v3.6.18

  Taro CLI 3.6.18 environment info:
    System:
      OS: macOS 13.5.2
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 20.8.1 - ~/.nvm/versions/node/v20.8.1/bin/node
      Yarn: 1.22.19 - /usr/local/bin/yarn
      npm: 10.1.0 - ~/.nvm/versions/node/v20.8.1/bin/npm
    npmPackages:
      @tarojs/cli: ^3.6.18 => 3.6.19 
      @tarojs/components: ^3.6.18 => 3.6.19 
      @tarojs/helper: ^3.6.18 => 3.6.19 
      @tarojs/mini-runner: ^3.6.18 => 3.6.19 
      @tarojs/plugin-framework-react: ^3.6.18 => 3.6.19 
      @tarojs/plugin-platform-alipay: ^3.6.18 => 3.6.19 
      @tarojs/plugin-platform-jd: ^3.6.18 => 3.6.19 
      @tarojs/plugin-platform-qq: ^3.6.18 => 3.6.19 
      @tarojs/plugin-platform-swan: ^3.6.18 => 3.6.19 
      @tarojs/plugin-platform-tt: ^3.6.18 => 3.6.19 
      @tarojs/plugin-platform-weapp: ^3.6.18 => 3.6.19 
      @tarojs/react: ^3.6.18 => 3.6.19 
      @tarojs/router: ^3.6.18 => 3.6.19 
      @tarojs/runtime: ^3.6.18 => 3.6.19 
      @tarojs/shared: ^3.6.18 => 3.6.19 
      @tarojs/taro: ^3.6.18 => 3.6.19 
      @tarojs/taro-h5: ^3.6.18 => 3.6.19 
      @tarojs/webpack5-runner: ^3.6.18 => 3.6.19 
      babel-preset-taro: ^3.6.18 => 3.6.19 
      eslint-config-taro: ^3.6.18 => 3.6.19 
      react: ^18.2.0 => 18.2.0 
      taro-ui: ^3.1.0-beta.2 => 3.1.0-beta.5 
xu-supper-heavyweight commented 6 months ago

我也遇到了这个问题

xu-supper-heavyweight commented 6 months ago

相关平台

快手小程序

复现仓库

https://github.com/saralee2012/taro-sample-kwai.git

使用框架: React

复现步骤

pages/index/index中引入快手原生组件,编译报错

期望结果

编译通过页面正常打开

实际结果

编译报错

环境信息

👽 Taro v3.6.18

  Taro CLI 3.6.18 environment info:
    System:
      OS: macOS 13.5.2
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 20.8.1 - ~/.nvm/versions/node/v20.8.1/bin/node
      Yarn: 1.22.19 - /usr/local/bin/yarn
      npm: 10.1.0 - ~/.nvm/versions/node/v20.8.1/bin/npm
    npmPackages:
      @tarojs/cli: ^3.6.18 => 3.6.19 
      @tarojs/components: ^3.6.18 => 3.6.19 
      @tarojs/helper: ^3.6.18 => 3.6.19 
      @tarojs/mini-runner: ^3.6.18 => 3.6.19 
      @tarojs/plugin-framework-react: ^3.6.18 => 3.6.19 
      @tarojs/plugin-platform-alipay: ^3.6.18 => 3.6.19 
      @tarojs/plugin-platform-jd: ^3.6.18 => 3.6.19 
      @tarojs/plugin-platform-qq: ^3.6.18 => 3.6.19 
      @tarojs/plugin-platform-swan: ^3.6.18 => 3.6.19 
      @tarojs/plugin-platform-tt: ^3.6.18 => 3.6.19 
      @tarojs/plugin-platform-weapp: ^3.6.18 => 3.6.19 
      @tarojs/react: ^3.6.18 => 3.6.19 
      @tarojs/router: ^3.6.18 => 3.6.19 
      @tarojs/runtime: ^3.6.18 => 3.6.19 
      @tarojs/shared: ^3.6.18 => 3.6.19 
      @tarojs/taro: ^3.6.18 => 3.6.19 
      @tarojs/taro-h5: ^3.6.18 => 3.6.19 
      @tarojs/webpack5-runner: ^3.6.18 => 3.6.19 
      babel-preset-taro: ^3.6.18 => 3.6.19 
      eslint-config-taro: ^3.6.18 => 3.6.19 
      react: ^18.2.0 => 18.2.0 
      taro-ui: ^3.1.0-beta.2 => 3.1.0-beta.5 

请问解决了吗

simple5960 commented 5 months ago

看起来是没有增加对 ksml 的编译支持,把替换成 wxml 吧,都是一样的语法,换成 wxml 可以