taro icon indicating copy to clipboard operation
taro copied to clipboard

css in js的 linaria 与小程序直播插件live-player-plugin 共用时报错

Open cbingrui opened this issue 6 years ago • 7 comments

相关平台

微信小程序

复现仓库

https://github.com/cbingrui/taro-issue-plugin-linaria 小程序基础库: 2.11.2 使用框架: React

复现步骤

  1. yarn
  2. yarn dev:weapp 控件台报错
  3. 注释 app.config.ts 的plugins配置后,页面能正常显示。

期望结果

能在使用linaria的情况下,同时使用小程序插件live-player-plugin。

实际结果

报错: image Cannot redefine property: toString TypeError: Cannot redefine property: toString at Object.defineProperty [as f] () at push../node_modules/core-js/internals/create-non-enumerable-property.js.module.exports (http://127.0.0.1:50339/appservice/pages/index/index.js:366:31) at push../node_modules/core-js/internals/redefine.js.module.exports (http://127.0.0.1:50339/appservice/pages/index/index.js:1091:35) at Object../node_modules/core-js/internals/redefine.js (http://127.0.0.1:50339/appservice/pages/index/index.js:1092:3) at webpack_require (http://127.0.0.1:50339/appservice/runtime.js:81:30) at Object../node_modules/core-js/internals/export.js (http://127.0.0.1:50339/appservice/pages/index/index.js:463:16) at webpack_require (http://127.0.0.1:50339/appservice/runtime.js:81:30) at Object../node_modules/core-js/modules/es.array.index-of.js (http://127.0.0.1:50339/appservice/pages/index/index.js:1330:9) at webpack_require (http://127.0.0.1:50339/appservice/runtime.js:81:30) at Object../node_modules/linaria/lib/react/styled.js (http://127.0.0.1:50339/appservice/pages/index/index.js:1448:1)(env: macOS,mp,1.03.2007212;lib: 2.11.2)

环境信息

👽 Taro v3.0.5


  Taro CLI 3.0.5 environment info:
    System:
      OS: macOS 10.15.5
      Shell: 5.7.1 - /bin/zsh
    Binaries:
      Node: 12.14.0 - /usr/local/bin/node
      Yarn: 1.21.1 - /usr/local/bin/yarn
      npm: 6.13.4 - /usr/local/bin/npm
    npmPackages:
      @tarojs/cli: 3.0.7 => 3.0.7 
      @tarojs/components: 3.0.7 => 3.0.7 
      @tarojs/mini-runner: 3.0.7 => 3.0.7 
      @tarojs/react: 3.0.7 => 3.0.7 
      @tarojs/runtime: 3.0.7 => 3.0.7 
      @tarojs/taro: 3.0.7 => 3.0.7 
      @tarojs/webpack-runner: 3.0.7 => 3.0.7 
      babel-preset-taro: 3.0.7 => 3.0.7 
      eslint-config-taro: 3.0.7 => 3.0.7 
      react: ^16.10.0 => 16.13.1 

补充信息

live-player-plugin 的1.1.7 发布时间: 2020-08-19 15:59:00。 yarn build 报同样的错误。
H5端开发与编译都正常。

cbingrui avatar Aug 20 '20 03:08 cbingrui

一样的问题,是微信直播组件的问题。你可以测试一下,没加入直播插件前,在控制台更改Object的prototype,是可以更改的。但是加入插件后,冻结了。

BigBugaboo avatar Sep 16 '20 07:09 BigBugaboo

遇到同样的问题,有没有解决办法

JX-Zhuang avatar Nov 05 '20 07:11 JX-Zhuang

关了ployfill

BigBugaboo avatar Nov 05 '20 09:11 BigBugaboo

+1

liyatang avatar Jan 05 '21 08:01 liyatang

遗憾,申请不了插件资格,没有办法调试。

一样的问题,是微信直播组件的问题。你可以测试一下,没加入直播插件前,在控制台更改Object的prototype,是可以更改的。但是加入插件后,冻结了。

看报错信息应该是这位老哥所说的问题,可以从这个方向入手 debug 一下

Chen-jj avatar Jan 28 '21 06:01 Chen-jj

遇到同样问题,怎么处理啊

Thinking80s avatar Oct 14 '21 11:10 Thinking80s

image 添加微信插件有报错 怎么解决 3.0.16版本可以加 3.0.29版本报错

lxfljw avatar Oct 14 '21 12:10 lxfljw