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 开发微信插件,编译H5应用报错(Can't resolve 'xxx/html' in 'xxx') #11521

Closed
datura-lj opened this issue Mar 28, 2022 · 2 comments
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x

Comments

@datura-lj
Copy link

相关平台

微信小程序

小程序基础库: 3.23.2
使用框架: React

复现步骤

  1. taro init 选择github源,wxplugin模版
  2. 运行 yarn build:h5 和 yarn dev:h5
  3. 报错 Failed to compile.

Error: Child compilation failed:
Entry module not found: Error: Can't resolve '/Users/xxxx/Documents/work/sc/baselib/fe_plugins_lib/src/index.html' in '/Users/xxx/Documents/work/sc/baselib/fe_plugins_lib':
Error: Can't resolve '/Users/xxx/Documents/work/sc/baselib/fe_plugins_lib/src/index.html' in '/Users/xx/Documents/work/sc/b aselib/fe_plugins_lib'

  • compiler.js:79
    [fe_plugins_lib]/[html-webpack-plugin]/lib/compiler.js:79:16

  • Compiler.js:343
    [fe_plugins_lib]/[webpack]/lib/Compiler.js:343:11

  • Compiler.js:681
    [fe_plugins_lib]/[webpack]/lib/Compiler.js:681:15

  • Hook.js:154 AsyncSeriesHook.lazyCompileHook
    [fe_plugins_lib]/[tapable]/lib/Hook.js:154:20

  • Compiler.js:678
    [fe_plugins_lib]/[webpack]/lib/Compiler.js:678:31

  • Hook.js:154 AsyncSeriesHook.lazyCompileHook
    [fe_plugins_lib]/[tapable]/lib/Hook.js:154:20

  • Compilation.js:1423
    [fe_plugins_lib]/[webpack]/lib/Compilation.js:1423:35

  • Hook.js:154 AsyncSeriesHook.lazyCompileHook
    [fe_plugins_lib]/[tapable]/lib/Hook.js:154:20

  • Compilation.js:1414
    [fe_plugins_lib]/[webpack]/lib/Compilation.js:1414:32

  • Hook.js:154 AsyncSeriesHook.lazyCompileHook
    [fe_plugins_lib]/[tapable]/lib/Hook.js:154:20

  • Compilation.js:1409
    [fe_plugins_lib]/[webpack]/lib/Compilation.js:1409:36

期望结果

可正常变异不报错

实际结果

报错编译失败

环境信息

👽 Taro v3.3.10


  Taro CLI 3.3.10 environment info:
    System:
      OS: macOS 10.15.7
      Shell: 5.7.1 - /bin/zsh
    Binaries:
      Node: 14.4.0 - ~/.nvm/versions/node/v14.4.0/bin/node
      Yarn: 1.22.5 - ~/.yarn/bin/yarn
      npm: 7.20.2 - ~/.nvm/versions/node/v14.4.0/bin/npm
    npmPackages:
      @tarojs/components: 3.3.10 => 3.3.10 
      @tarojs/mini-runner: 3.3.10 => 3.3.10 
      @tarojs/react: 3.3.10 => 3.3.10 
      @tarojs/runtime: 3.3.10 => 3.3.10 
      @tarojs/taro: 3.3.10 => 3.3.10 
      @tarojs/webpack-runner: 3.3.10 => 3.3.10 
      babel-preset-taro: 3.3.10 => 3.3.10 
      eslint-config-taro: 3.3.10 => 3.3.10 
      react: ^17.0.0 => 17.0.2
@taro-bot2 taro-bot2 bot added F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x labels Mar 28, 2022
@Chen-jj
Copy link
Contributor

Chen-jj commented Mar 28, 2022

wxplugin 模板只能用于开发微信、支付宝的小程序插件。不能再编译为 H5 的。

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