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

Uncaught ReferenceError: React is not defined #32

Closed
3 tasks done
seekplum opened this issue Sep 28, 2022 · 0 comments
Closed
3 tasks done

Uncaught ReferenceError: React is not defined #32

seekplum opened this issue Sep 28, 2022 · 0 comments

Comments

@seekplum
Copy link

seekplum commented Sep 28, 2022

检查

  • 这个问题在 master 分支存在
  • 这个问题在 manifest-v3 分支存在
  • 这个问题只在 yarn build 构建的产物中出现,通过 yarn start 构建的产物可以正常工作

基础信息

  • 代码分支: master/manifest-v3
  • Node 版本: v14.18.2
  • Yarn 版本: 1.22.19

报错信息

Uncaught ReferenceError: React is not defined
    at Object.bc2f415eff8759b90940 (popup.js:17:6297)
    at i (popup.js:30:4550)
    at popup.js:30:6176
    at i.O (popup.js:30:4820)
    at popup.js:30:6208
    at popup.js:30:6214

复现步骤

下载项目并build插件

git clone --depth=1 --branch master git@github.com:tjx666/awesome-chrome-extension-boilerplate.git

cd awesome-chrome-extension-boilerplate

yarn install

yarn build

安装插件

  • 1.Chrome 浏览器允许「开发者模式」
  • 2.「加载已解压的扩展程序」选择 extension 目录

使用插件复现错误

  • 1.安装插件后无法查看 popup 页面
  • 2.在 popup 中 「右键」选择 「审查弹出内容」的 Console 中可以看到 报错信息
@seekplum seekplum changed the title Uncaught ReferenceError: React is not defined Uncaught ReferenceError: React is not defined #bug Sep 28, 2022
@seekplum seekplum changed the title Uncaught ReferenceError: React is not defined #bug Uncaught ReferenceError: React is not defined Sep 28, 2022
seekplum pushed a commit to seekplum/awesome-chrome-extension-boilerplate that referenced this issue Sep 28, 2022
@tjx666 tjx666 closed this as completed Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants