You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
相关平台
微信小程序
复现仓库
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)
环境信息
补充信息
经过粗略的排查,报错主要是在项目中的 get-intrinsic 这个依赖包中,一起这个这个依赖包报错的原因是,如果在开启插件的情况下,依赖包的入口文件第 304 行 desc 的值 是不可枚举的,且没有 value 字段,也就是说 String.prototype.indexOf 还没有被赋值。如果把插件注释后,可以正常获取到 indexOf 的函数

开启插件:

注释插件:
The text was updated successfully, but these errors were encountered: