reactjs - TypeError: validateOptions 不是一個函數
我正在使用 React.js 和 TypeScript 編碼,雖然這些代碼更改在我提交時之前是有效的——但在某個時候出了問題,這個錯誤在所有不同的提交中仍然存在。
我不確定這個錯誤在哪裡,因為 Visual Studio Code 在 index.tsx 中沒有檢測到任何東西
Failed to compile.
./src/index.tsx
TypeError: validateOptions is not a function
at Generator.next (<anonymous>)
at new Promise (<anonymous>)
index.tsx
import React from 'react';
import ReactDOM from 'react-dom';
import 'bootstrap/dist/css/bootstrap.css';
import './index.scss';
import App from './App';
import reportWebVitals from './reportWebVitals';
ReactDOM.render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.getElementById('root')
);
// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint.
reportWebVitals();