Problem
After running npm install
then npm start
, it failed to compile.
Solution
- Replace the
start
andbuild
scripts in yourpackage.json
:
"start": "react-scripts --openssl-legacy-provider start",
"build": "react-scripts --openssl-legacy-provider build",
- Import React into your App.js file
import React from 'react';
- Save both files and refresh