简体   繁体   English

我在浏览器控制台中看不到 react lint 错误

[英]I can't see react lint errors in my browser console

I started a new ReactJS project, using npx create-react-app and I can't see lint errors in browser, but they are shown on vscode terminal.我使用 npx npx create-react-app启动了一个新的 ReactJS 项目,但在浏览器中看不到 lint 错误,但它们显示在 vscode 终端上。 I really don't know what to do, I want the another way around, to be shown on browser console, and maybe not in terminal.我真的不知道该怎么做,我想要另一种方式,显示在浏览器控制台上,也许不在终端上。 I tried with different browsers, with the same outcome.我尝试了不同的浏览器,结果相同。 This is the package.json file that it's used.这是它使用的package.json文件。

{
  "name": "react-project",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "antd": "^4.17.3",
    "i18next": "^21.6.3",
    "react": "^17.0.2",
    "react-dom": "^17.0.2",
    "react-i18next": "^11.15.1",
    "react-router-dom": "5",
    "react-scripts": "5.0.0",
    "web-vitals": "^2.1.2"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
    "extends": [
      "react-app",
      "react-app/jest"
    ]
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  }
}

It never happened with me, but try to stop your application, delete the node_modules folder and run npm i again to install all the dependencies.我从来没有发生过,但尝试停止您的应用程序,删除 node_modules 文件夹并再次运行npm i以安装所有依赖项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为什么我在 Chrome 控制台中看不到我的对象反应? - Why I can't see my objects in chrome console in react? 可以在控制台中看到JSON数据,无法呈现到浏览器 - Can see JSON data in console, can't render to browser 我正在使用 JavaScript (DOM),但无法直接在浏览器的控制台中控制台记录我的 innerHTML - I'm working with JavaScript (DOM), and I can't console log my innerHTML directly in my browser's console 解析geojson文件后,为什么在浏览器中看不到地图? - Why can't I see the map in my browser after parsing the geojson file? 为什么在浏览器中看不到我的App渲染(Marionette.js教程)? - Why I can't see my App rendering in the browser(Marionette.js tutorial)? 为什么我无法从浏览器中看到我的js文件-tomcat 7 - Why i can't see my js file from browser - tomcat 7 为什么我无法在原始React Web应用程序的首页上看到测试文本? - Why can't I see my test text on the front page of my original React web app? JavaScript控制台可以看到对象的内容,但是我无法访问它 - JavaScript console can see contents of Object but I can't access it 尝试部署我的应用程序,但在浏览器中看不到前端 - Trying to deploy my app, but can't see the frontend in the browser 如何在控制台上查看我上传的图片名称? - How I can see my uploading images' names on console?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM