'React' refers to a UMD global, but the current file is a module

2024. 1. 2. 12:47카테고리 없음

반응형

1) Make sure the versions of react, react-scripts and typescript.

For me, this worked:

"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-scripts": "5.0.1",
"typescript": "^4.9.5",
"web-vitals": "^2.1.4"

2) Turn the VS Code Editor off then on.

반응형