NervJS / taro-ui

一款基于 Taro 框架开发的多端 UI 组件库
https://taro-ui.taro.zone
MIT License
4.52k stars 756 forks source link

引用taro-ui,最后yarn run build:weapp,运行小程序报错,提示Component is not found in path #1210

Open JinBing91 opened 3 years ago

JinBing91 commented 3 years ago

问题描述 引用taro-ui,在yarn run build:weapp编译后,运行小程序,引用了taro-UI的页面报错,提示Component is not found in path "npm/taro-ui/dist/weapp/components/noticebar/index"

复现步骤

  1. yarn run dev:weapp,涉及使用taro-ui的操作正常
  2. yarn run build:weapp,涉及使用taro-ui的提示错误 SystemError (jsEnginScriptError) Component is not found in path "npm/taro-ui/dist/weapp/components/noticebar/index" (using by "pages/classes/index") Error: Component is not found in path "npm/taro-ui/dist/weapp/components/noticebar/index" (using by "pages/classes/index")

期望行为 打包编译成功,并运行不会提示找不到组件

报错信息 image

系统信息 Taro CLI 2.2.15 environment info: System: OS: macOS 10.15.5 Shell: 5.7.1 - /bin/zsh Binaries: Node: 12.16.3 - /usr/local/bin/node Yarn: 1.22.4 - /usr/local/bin/yarn npm: 6.14.4 - /usr/local/bin/npm npmPackages: @tarojs/cli: 2.2.15 => 2.2.15 @tarojs/components: 2.2.15 => 2.2.15 @tarojs/components-qa: 2.2.15 => 2.2.15 @tarojs/mini-runner: 2.2.15 => 2.2.15 @tarojs/plugin-sass: ^2.2.10 => 2.2.10 @tarojs/plugin-uglify: ^2.2.10 => 2.2.10 @tarojs/router: 2.2.15 => 2.2.15 @tarojs/taro: 2.2.15 => 2.2.15 @tarojs/taro-alipay: 2.2.15 => 2.2.15 @tarojs/taro-h5: 2.2.15 => 2.2.15 @tarojs/taro-qq: 2.2.15 => 2.2.15 @tarojs/taro-quickapp: 2.2.15 => 2.2.15 @tarojs/taro-rn: 2.2.15 => 2.2.15 @tarojs/taro-swan: 2.2.15 => 2.2.15 @tarojs/taro-tt: 2.2.15 => 2.2.15 @tarojs/taro-weapp: 2.2.15 => 2.2.15 @tarojs/webpack-runner: 2.2.15 => 2.2.15 eslint-config-taro: 2.2.15 => 2.2.15 eslint-plugin-taro: 2.2.15 => 2.2.15 nerv-devtools: ^1.5.7 => 1.5.7 nervjs: ^1.5.7 => 1.5.7 stylelint-config-taro-rn: 2.2.15 => 2.2.15 stylelint-taro-rn: 2.2.15 => 2.2.15 taro-ui: ^2.3.4 => 2.3.4

taro-ui-bot[bot] commented 3 years ago

欢迎提交 Issue~

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

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

Good luck and happy coding~

DuanShuaiShuai commented 3 years ago

+1

hbk671104 commented 3 years ago

+1

ortizyc commented 3 years ago

+1

daimashenjing commented 3 years ago

我也遇到了同样的问题 从 2.2.13升级到2.2.15就会出错 降级回去就对了 image

iamlightart commented 3 years ago

遇到同样问题,版本回滚至2.2.13解决,2.2.15可正常 yarn dev:weapp

PhantomRay commented 3 years ago

+1

polichan commented 3 years ago

有人解决了吗?

zSergeant commented 3 years ago

我把taro升级到2.2.13就好了,原本是2.2.9的

PhantomRay commented 3 years ago

我把taro从2.1.6测到当前最新的所有版本,只有2.1.6可以build,其它都要dev模式才能用。问题在于taro,不是taro-ui。

luckyadam commented 3 years ago

https://github.com/NervJS/taro/issues/7913#issuecomment-723991922 请尝试下

PhantomRay commented 3 years ago

NervJS/taro#7913 (comment) 请尝试下

有效