Open BurnhamZhang opened 3 years ago
微信小程序
小程序基础库: 2.16.0 使用框架: React
清除node_modules后重新安装依赖
正常运行
Function.prototype.apply was called on WeakMap.prototype.get, which is a string and not a function TypeError: Function.prototype.apply was called on WeakMap.prototype.get, which is a string and not a function at callBoundIntrinsic (http://127.0.0.1:22812/appservice/vendors.js?t=wechat&s=1616482358908&v=598a625ade77229c1c08d6fba425d61a:8916:42) at Object../node_modules/side-channel/index.js (http://127.0.0.1:22812/appservice/vendors.js?t=wechat&s=1616482358908&v=598a625ade77229c1c08d6fba425d61a:41394:19) at webpack_require__ (http://127.0.0.1:22812/appservice/runtime.js?t=wechat&s=1616482358908&v=e9fdb6ecc58c8c8daee68c8c7b0dbd27:80:30) at Object../node_modules/qs/lib/stringify.js (http://127.0.0.1:22812/appservice/vendors.js?t=wechat&s=1616482358908&v=598a625ade77229c1c08d6fba425d61a:39944:22) at webpack_require (http://127.0.0.1:22812/appservice/runtime.js?t=wechat&s=1616482358908&v=e9fdb6ecc58c8c8daee68c8c7b0dbd27:80:30) at Object../node_modules/qs/lib/index.js (http://127.0.0.1:22812/appservice/vendors.js?t=wechat&s=1616482358908&v=598a625ade77229c1c08d6fba425d61a:39655:17) at __webpack_require (http://127.0.0.1:22812/appservice/runtime.js?t=wechat&s=1616482358908&v=e9fdb6ecc58c8c8daee68c8c7b0dbd27:80:30) at Module../node_modules/@tarojs/mini-runner/dist/loaders/wxTransformerLoader.js?!./src/components/CouponDetail/index.tsx?taro&type=script&parse=COMPONENT& (http://127.0.0.1:22812/appservice/components/CouponDetail/index.js?t=wechat&s=1616482358908&v=7c4b6a74a947ca63d10e259264f34cc0:14:60) at __webpack_require__ (http://127.0.0.1:22812/appservice/runtime.js?t=wechat&s=1616482358908&v=e9fdb6ecc58c8c8daee68c8c7b0dbd27:80:30) at Module../src/components/CouponDetail/index.tsx?taro&type=script&parse=COMPONENT& (http://127.0.0.1:22812/appservice/components/CouponDetail/index.js?t=wechat&s=1616482358908&v=7c4b6a74a947ca63d10e259264f34cc0:245:178)
Taro CLI 3.0.17 environment info: System: OS: macOS 11.0.1 Shell: 5.8 - /bin/zsh Binaries: Node: 14.7.0 - /usr/local/bin/node Yarn: 1.22.10 - /usr/local/bin/yarn npm: 6.14.7 - /usr/local/bin/npm npmPackages: @tarojs/cli: 2.2.17 => 2.2.17 @tarojs/components: 2.2.17 => 2.2.17 @tarojs/mini-runner: 2.2.17 => 2.2.17 @tarojs/router: 2.2.17 => 2.2.17 @tarojs/taro: 2.2.17 => 2.2.17 @tarojs/taro-h5: 2.2.17 => 2.2.17 @tarojs/webpack-runner: 2.2.17 => 2.2.17 eslint-config-taro: 2.2.17 => 2.2.17 eslint-plugin-taro: 2.2.17 => 2.2.17 nerv-devtools: ^1.5.7 => 1.5.7 nervjs: ^1.5.7 => 1.5.7 taro-ui: 2.3.4 => 2.3.4
之前相同的代码运行一切正常,重新安装了依赖以后运行报错
看了一下貌似是qs版本的问题,我把qs版本指定到6.9.6,报错就没了
相关平台
微信小程序
小程序基础库: 2.16.0 使用框架: React
复现步骤
清除node_modules后重新安装依赖
期望结果
正常运行
实际结果
Function.prototype.apply was called on WeakMap.prototype.get, which is a string and not a function TypeError: Function.prototype.apply was called on WeakMap.prototype.get, which is a string and not a function at callBoundIntrinsic (http://127.0.0.1:22812/appservice/vendors.js?t=wechat&s=1616482358908&v=598a625ade77229c1c08d6fba425d61a:8916:42) at Object../node_modules/side-channel/index.js (http://127.0.0.1:22812/appservice/vendors.js?t=wechat&s=1616482358908&v=598a625ade77229c1c08d6fba425d61a:41394:19) at webpack_require__ (http://127.0.0.1:22812/appservice/runtime.js?t=wechat&s=1616482358908&v=e9fdb6ecc58c8c8daee68c8c7b0dbd27:80:30) at Object../node_modules/qs/lib/stringify.js (http://127.0.0.1:22812/appservice/vendors.js?t=wechat&s=1616482358908&v=598a625ade77229c1c08d6fba425d61a:39944:22) at webpack_require (http://127.0.0.1:22812/appservice/runtime.js?t=wechat&s=1616482358908&v=e9fdb6ecc58c8c8daee68c8c7b0dbd27:80:30) at Object../node_modules/qs/lib/index.js (http://127.0.0.1:22812/appservice/vendors.js?t=wechat&s=1616482358908&v=598a625ade77229c1c08d6fba425d61a:39655:17) at __webpack_require (http://127.0.0.1:22812/appservice/runtime.js?t=wechat&s=1616482358908&v=e9fdb6ecc58c8c8daee68c8c7b0dbd27:80:30) at Module../node_modules/@tarojs/mini-runner/dist/loaders/wxTransformerLoader.js?!./src/components/CouponDetail/index.tsx?taro&type=script&parse=COMPONENT& (http://127.0.0.1:22812/appservice/components/CouponDetail/index.js?t=wechat&s=1616482358908&v=7c4b6a74a947ca63d10e259264f34cc0:14:60) at __webpack_require__ (http://127.0.0.1:22812/appservice/runtime.js?t=wechat&s=1616482358908&v=e9fdb6ecc58c8c8daee68c8c7b0dbd27:80:30) at Module../src/components/CouponDetail/index.tsx?taro&type=script&parse=COMPONENT& (http://127.0.0.1:22812/appservice/components/CouponDetail/index.js?t=wechat&s=1616482358908&v=7c4b6a74a947ca63d10e259264f34cc0:245:178)
环境信息
补充信息
之前相同的代码运行一切正常,重新安装了依赖以后运行报错