-3

I'm using React and I wanted to start the outside API server but I met a problem.

I can't find a solution for problem on screen below:

React must be in scope using JSX

The problem happens when I'm trying to start the app using npm start.

I already have line import React from 'react' on my index.js.

I'm trying to start the app using command npm start. It was working before, but I installed some things in terminal. Ran command: npm audit fix --force to fix some critical problems on terminal.

jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
Piotr
  • 1
  • 1
  • https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/docs/rules/react-in-jsx-scope.md Also note `npm audit fix --force` makes breaking up- and even down-grades to your dependencies, I would strongly recommend **not** running it unless you're really sure you want that. – jonrsharpe Jan 13 '23 at 10:40
  • please learn use simple hello world program from react docs, and things will work fine – vijay Jan 13 '23 at 10:44
  • maybe this might help https://stackoverflow.com/questions/42640636/react-must-be-in-scope-when-using-jsx-react-react-in-jsx-scope – uio Jan 13 '23 at 10:47
  • Does this answer your question? ['React' must be in scope when using JSX react/react-in-jsx-scope?](https://stackoverflow.com/questions/42640636/react-must-be-in-scope-when-using-jsx-react-react-in-jsx-scope) – Henry Woody Feb 23 '23 at 17:55

1 Answers1

-1

Ok, I just dodged that problem with creating another new project, coppied everything from the old one and it's working, lol. As like jonrsharpe wrote, do not write npm audit fix --force in terminal if you aren't sure about it.

Piotr

Piotr
  • 1
  • 1