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 3.2.1 或 3.3.0 添加腾讯视频插件后报错 #9830

Open
kunkuntang opened this issue Jul 19, 2021 · 5 comments
Open

Taro 3.2.1 或 3.3.0 添加腾讯视频插件后报错 #9830

kunkuntang opened this issue Jul 19, 2021 · 5 comments
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x

Comments

@kunkuntang
Copy link

相关平台

微信小程序

复现仓库

https://github.com/kunkuntang/taro-plugins-issue
小程序基础库: 2.18.0
使用框架: React

复现步骤

启动项目就会报错
在 app.config.ts 把 plugins 中的插件注释就正常显示页面

期望结果

可以正常显示页面

实际结果

控制台报错,报错信息:

VM654:8254 页面【pages/debugger/index]错误:
TypeError: Function.prototype.apply was called on WeakMap.prototype.get, which is a string and not a function
at callBoundIntrinsic (._node_modules_call-bind_callBound.js:11)
at Object../node_modules/side-channel/index.js (._node_modules_side-channel_index.js:11)
at webpack_require (webpack_bootstrap:79)
at Object../node_modules/qs/lib/stringify.js (._node_modules_qs_lib_stringify.js:3)
at webpack_require (webpack_bootstrap:79)
at Object../node_modules/qs/lib/index.js (._node_modules_qs_lib_index.js:3)
at webpack_require (webpack_bootstrap:79)
at Object../node_modules/babel-loader/lib/index.js!./src/pages/debugger/index.tsx (.node_modules@babel_runtime_helpers_esm_objectSpread2.js:39)
at webpack_require (webpack_bootstrap:79)
at Module../src/pages/debugger/index.tsx (index.tsx?b8ab:1)(env: macOS,mp,1.05.2107090; lib: 2.18.0)

环境信息

👽 Taro v3.3.0


  Taro CLI 3.3.0 environment info:
    System:
      OS: macOS 10.15.7
      Shell: 5.7.1 - /bin/zsh
    Binaries:
      Node: 12.18.2 - ~/.nvm/versions/node/v12.18.2/bin/node
      Yarn: 1.22.4 - /usr/local/bin/yarn
      npm: 6.14.5 - ~/.nvm/versions/node/v12.18.2/bin/npm
    npmPackages:
      @tarojs/components: 3.3.0 => 3.3.0 
      @tarojs/mini-runner: 3.3.0 => 3.3.0 
      @tarojs/react: 3.3.0 => 3.3.0 
      @tarojs/runtime: 3.3.0 => 3.3.0 
      @tarojs/taro: 3.3.0 => 3.3.0 
      @tarojs/webpack-runner: 3.3.0 => 3.3.0 
      babel-preset-taro: 3.3.0 => 3.3.0 
      eslint-config-taro: 3.3.0 => 3.3.0 
      react: ^17.0.0 => 17.0.2 
      taro-ui: ^3.0.0-alpha.10 => 3.0.0-alpha.10 


补充信息

经过粗略的排查,报错主要是在项目中的 get-intrinsic 这个依赖包中,一起这个这个依赖包报错的原因是,如果在开启插件的情况下,依赖包的入口文件第 304 行 desc 的值 是不可枚举的,且没有 value 字段,也就是说 String.prototype.indexOf 还没有被赋值。如果把插件注释后,可以正常获取到 indexOf 的函数
image

开启插件:
image

注释插件:

image

@taro-bot2 taro-bot2 bot added F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x labels Jul 19, 2021
@Chen-jj
Copy link
Contributor

Chen-jj commented Jul 19, 2021

@kunkuntang 这个问题应该和 Taro 无关吧

@kunkuntang
Copy link
Author

@kunkuntang 这个问题应该和 Taro 无关吧

这个我也不太清楚是 微信的问题还是 Taro 的问题,自己安装的依赖也没几个,添加插件后项目就启动不了了

@Chen-jj
Copy link
Contributor

Chen-jj commented Jul 20, 2021

get-intrinsic 这个包不是 Taro 的依赖,只能建议按照报错堆栈调试一下了。

@kucy
Copy link

kucy commented Aug 9, 2021

解决了嘛?我也遇到了这个错误,用的腾讯地图插件

@kucy
Copy link

kucy commented Aug 10, 2021

经过老李的指点,qs 使用 6.9.4 版本就没报错了

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

3 participants