未捕获(承诺中)错误:简化React错误#321;请访问www.example.comhttps://reactjs.org/docs/error-decoder.html?invariant=321

cnh2zyt3  于 2023-03-01  发布在  React
关注(0)|答案(1)|浏览(284)

我正在尝试使用Vite创建一个新的React应用程序。到目前为止,我所做的是运行命令npm create vite@latest。我可以创建应用程序,运行npm install,npm run dev在localhost上运行它。但当我打开控制台时,出现了一条错误消息,我在互联网上找不到任何解决方案来修复它。错误如下:

Uncaught (in promise) Error: Minified React error #321; visit https://reactjs.org/docs/error-decoder.html?invariant=321 for the full message or use the non-minified dev environment for full errors and additional helpful warnings. 
at it (blur.js:42:3933)
    at s.useContext (blur.js:42:5675)
    at cr (blur.js:57:31858)
    at blur.js:61:494
    at blur.js:126:5191
    at Generator.next (<anonymous>)
    at I (blur.js:126:4967)

我用Git Bash创建了应用程序,错误出现了。然后我用Windows PowerShell尝试,结果还是一样。即使我没有对代码做任何更改,错误也在我运行“npm run dev”后立即出现
这里是我的包:

{
    "name": "sikka-patient-portal",
    "private": true,
    "version": "0.0.0",
    "type": "module",
    "scripts": {
        "dev": "vite",
        "build": "vite build",
        "preview": "vite preview"
    },
    "dependencies": {
        "@reduxjs/toolkit": "^1.9.3",
        "react": "^18.2.0",
        "react-dom": "^18.2.0",
        "react-redux": "^8.0.5",
        "react-router-dom": "^6.8.2",
        "redux": "^4.2.1",
        "sass": "^1.58.3"
    },
    "devDependencies": {
        "@types/react": "^18.0.27",
        "@types/react-dom": "^18.0.10",
        "@vitejs/plugin-react": "^3.1.0",
        "vite": "^4.1.0"
    },
    "browserslist": {
        "production": [
            ">0.2%",
            "not dead",
            "not op_mini all"
        ],
        "development": [
            "last 1 chrome version",
            "last 1 firefox version",
            "last 1 safari version"
        ]
    }
}

有没有人有解决办法?非常感谢!
我尝试用不同的终端(Git Bash,Windows Powershell)创建应用程序,以及在网上寻找解决方案,但没有找到任何。

bf1o4zei

bf1o4zei1#

我今天也收到了....,.据我了解,好像没有链接到你们/我们的代码库,我这边好像链接到了一个Chrome扩展(Loom),我把它关闭后,这个错误就消失了

相关问题