jd-opensource / jd-opensource/taro-ui

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

Open
#1,210 12 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.7k
Forks
740
PR merge metrics
No merged PRs in 30d

Description

**问题描述**
引用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](https://user-images.githubusercontent.com/7591737/94755496-52f38b80-03c7-11eb-99ec-5c7f3bb7a8ea.png)

**系统信息**
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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.