WXMLRT_$gwx:./base.wxml:template:27:20: Template `tmpl_0_23` not found.
相关平台
微信小程序
小程序基础库: 3.3.4 使用框架: React
复现步骤
主要使用以下模块: import React, { useState, useEffect } from 'react' import Taro from '@tarojs/taro'
import { View, Text, Button, Input, ScrollView, Image } from '@tarojs/components';
import axios from 'axios';
期望结果
出现界面
实际结果
空白
环境信息
(base) PS F:\tarotest\todolist> taro info
👽 Taro v3.6.23
Taro CLI 3.6.23 environment info:
System:
OS: Windows 11 10.0.22621
Binaries:
Node: 20.11.0 - D:\nodejs\node.EXE
Yarn: 1.22.21 - D:\nodejs\node_global\yarn.CMD
npm: 10.2.4 - D:\nodejs\npm.CMD
npmPackages:
@tarojs/cli: 3.6.23 => 3.6.23
@tarojs/components: 3.6.23 => 3.6.23
@tarojs/helper: 3.6.23 => 3.6.23
@tarojs/plugin-framework-react: 3.6.23 => 3.6.23
@tarojs/plugin-platform-alipay: 3.6.23 => 3.6.23
@tarojs/plugin-platform-h5: 3.6.23 => 3.6.23
@tarojs/plugin-platform-jd: 3.6.23 => 3.6.23
@tarojs/plugin-platform-qq: 3.6.23 => 3.6.23
@tarojs/plugin-platform-swan: 3.6.23 => 3.6.23
@tarojs/plugin-platform-tt: 3.6.23 => 3.6.23
@tarojs/plugin-platform-weapp: 3.6.23 => 3.6.23
@tarojs/react: 3.6.23 => 3.6.23
@tarojs/runtime: 3.6.23 => 3.6.23
@tarojs/shared: 3.6.23 => 3.6.23
@tarojs/taro: 3.6.23 => 3.6.23
@tarojs/taro-loader: 3.6.23 => 3.6.23
@tarojs/webpack5-runner: 3.6.23 => 3.6.23
babel-preset-taro: 3.6.23 => 3.6.23
eslint-config-taro: 3.6.23 => 3.6.23
react: ^18.0.0 => 18.2.0
@zjrwtxdaydayup 麻烦提供一下可复现的demo
我这边是开启了 watch 的 PreBundle 导致的,从 @taro/components 库中引入了 Button 组件,然后就会报 WXMLRT_$73686f705061636b6167652f:./base.wxml:template:419:20: Template tmpl_0_13 not found,你把 Button 删掉是不是警告也没有了
我的解决方案将config/index.ts中的compiler: "webpack5"改为
compiler: { type: 'webpack5', prebundle: { enable: false, force: true } },
重新启动一下
我也遇到了同样的问题 并且这个问题不是必现部分机型编译后会有这种问题