Error: error:0308010C:digital envelope routines::unsupported Node.js v18.04.0

Viewed 68

I tried starting my first project in React and everything kinda worked fine, but I realized that there were warnings showing all the time in the console so I used the command npm audit fix --force, but afterwards trying to run my project, I started to recieve the above mentioned error message. I've read that changing a line in the package.json file to "start": "react-scripts --openssl-legacy-provider start" should resolve this issue, but I even get more error messages

  Line 25:  'React' must be in scope when using JSX  react/react-in-jsx-scope
  Line 26:  'React' must be in scope when using JSX  react/react-in-jsx-scope
  Line 27:  'React' must be in scope when using JSX  react/react-in-jsx-scope
  Line 28:  'React' must be in scope when using JSX  react/react-in-jsx-scope
  Line 36:  'React' must be in scope when using JSX  react/react-in-jsx-scope
  Line 37:  'React' must be in scope when using JSX  react/react-in-jsx-scope
  Line 38:  'React' must be in scope when using JSX  react/react-in-jsx-scope
  Line 45:  'React' must be in scope when using JSX  react/react-in-jsx-scope
  Line 46:  'React' must be in scope when using JSX  react/react-in-jsx-scope
  Line 47:  'React' must be in scope when using JSX  react/react-in-jsx-scope```
Since I use version 18 of npm, is it worth to actually downgrade to LTS 16?
0 Answers
Related