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

执行taro build --ui 报错“Error: 不存在编译平台 ui” #8100

Closed
cqwanli opened this issue Nov 23, 2020 · 1 comment
Closed

执行taro build --ui 报错“Error: 不存在编译平台 ui” #8100

cqwanli opened this issue Nov 23, 2020 · 1 comment
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x

Comments

@cqwanli
Copy link

cqwanli commented Nov 23, 2020

相关平台

微信小程序

复现仓库

git@github.com:NervJS/taro-ui-sample.git
小程序基础库: 2.13.2
使用框架: React

复现步骤

  1. 下载代码。
  2. 安装相关依赖,npm install。
  3. 安装npm包 cross-env
  4. 在package.json的scripts字段添加。 "build:ui": "cross-env TARO_BUILD_TYPE=ui taro build --ui"
  5. 按照文档的指引完成项目修改。
  6. 执行命令 npm run build:ui

期望结果

期望正常编译出第三方组件

实际结果

LEOLIWAN-MB0:taro-ui-sample-master wanli$ npm run build:ui

taro-ui-sample@1.0.0 build:ui /Users/wanli/Downloads/taro-ui-sample-master
cross-env TARO_BUILD_TYPE=ui taro build --ui

👽 Taro v3.0.17

(node:39096) UnhandledPromiseRejectionWarning: Error: 不存在编译平台 ui
at Kernel.runWithPlatform (/usr/local/lib/node_modules/@tarojs/cli/node_modules/@tarojs/service/dist/Kernel.js:218:19)
at Kernel. (/usr/local/lib/node_modules/@tarojs/cli/node_modules/@tarojs/service/dist/Kernel.js:261:36)
at Generator.next ()
at fulfilled (/usr/local/lib/node_modules/@tarojs/cli/node_modules/@tarojs/service/dist/Kernel.js:5:58)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:39096) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:39096) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

环境信息

👽 Taro v3.0.17


  Taro CLI 3.0.17 environment info:
    System:
      OS: macOS 10.15.7
      Shell: 5.7.1 - /bin/zsh
    Binaries:
      Node: 12.18.3 - /usr/local/bin/node
      Yarn: 1.22.4 - /usr/local/bin/yarn
      npm: 6.14.8 - /usr/local/bin/npm
    npmPackages:
      @tarojs/components: ^1.3.21 => 1.3.46 
      @tarojs/router: ^1.3.21 => 1.3.46 
      @tarojs/taro: ^1.3.21 => 1.3.46 
      @tarojs/taro-h5: ^1.3.21 => 1.3.46 
      @tarojs/webpack-runner: ^1.3.21 => 1.3.46 
      eslint-config-taro: ^1.3.21 => 1.3.46 
      eslint-plugin-taro: ^1.3.21 => 1.3.46 
      nervjs: ^1.4.3 => 1.5.7 
@taro-bot2 taro-bot2 bot added F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x labels Nov 23, 2020
@Chen-jj
Copy link
Contributor

Chen-jj commented Nov 23, 2020

3.x 不需要这个命令了,可以参考这个仓库进行组织:https://github.com/NervJS/taro-uilib-react

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x
Projects
None yet
Development

No branches or pull requests

2 participants