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 [email protected]打包微信小程序后文件路径与引用路径不符 #1721
Comments
欢迎提交 Issue~ 如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏 如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。 Good luck and happy coding~ |
提供个最小可复现的 Demo |
已解决。 |
|
我也是遇到这个问题我用的是pnpm 路径多了一层.npm 能贴一下你的解决办法吗 |
我是在项目config文件里写了个方法传入打包过程中,然后在打包代码里应用 这是打包的代码里引用的代码: 这算是邪道方案,因为打包配置不熟,没法一劳永逸,每次重新安装依赖都得重新加入后面这个。 |
历史遗留问题了,我看下能不能正对 v2 版本修复一下,当然如果可以,尽可能使用 v3 版本 |
Taro UI 版本信息
v2.3.4
问题描述
运行后小程序开发工具上提示weapp/npm/taro-ui/dist/weapp/components/tab-bar/index 路径下未找到组件,检查文件路径后发现路径不同。
取消提示页面的引用后发现其他引用Taro UI组件的页面均有该提示。
运行过程中未报错。
复现步骤
1.taro build --type weapp
复现代码
import { AtTabBar, } from 'taro-ui'
报错信息
[ pages/order-list/index.json 文件内容错误] pages/order-list/index.json: ["usingComponents"]["at-tab-bar"]: "../../npm/taro-ui/dist/weapp/components/tab-bar/index",在 D:\work\Taro-joylink_minipro\dist\weapp/npm/taro-ui/dist/weapp/components/tab-bar/index 路径下未找到组件(env: Windows,mp,1.06.2308310; lib: 3.2.4)
系统信息
Taro CLI 2.2.21 environment info:
System:
OS: Windows 10
Binaries:
Node: 14.21.3 - D:\setup\nvm\nodejs\node.EXE
Yarn: 1.22.19 - D:\setup\nvm\node_global\yarn.CMD
npm: 6.14.18 - D:\setup\nvm\nodejs\npm.CMD
"@tarojs/components": "2.2.16",
"@tarojs/components-qa": "2.2.16",
"@tarojs/plugin-sass": "^2.2.10",
"@tarojs/plugin-uglify": "^2.2.10",
"@tarojs/redux": "2.2.16",
"@tarojs/router": "2.2.16",
"@tarojs/taro": "2.2.16",
"@tarojs/taro-alipay": "2.2.16",
"@tarojs/taro-weapp": "2.2.16",
"taro-ui": "^2.3.0",
补充信息
The text was updated successfully, but these errors were encountered: