我还没有导入动作,它说“动作”不是从“历史记录”中导出的。我什至不知道该怎么办。 信息:我更新了历史记录的先前版本,因为更新历史记录时路由出现问题 这是我的代码:
import React from 'react';
import { render } from 'react-dom';
import './App.css';
import Navbar from "./components/Navbar/Navbar";
import Home from './components/Pages/Home';
import Intro from './components/Pages/Intro';
import LogIn from './components/Pages/LogIn';
import SignUp from './components/Pages/SignUp';
import Recomendations from './components/Pages/Recomendations';
import Reviewed from './components/Pages/Reviewed';
import AboutUs from './components/Pages/AboutUs';
import Bookmarks from './components/Pages/Bookmarks';
import Error from './components/Pages/Error';
import { Router, Switch, Route } from 'react-router-dom';
function App() {
return (
<>
<Navbar />
<Router>
<Route exact path='/' component={Intro} />
<Route path='/intro' component={Intro} />
<Route path='/error' component={Error} />
</Router>
</>
);
}
export default App;
答案 0 :(得分:0)
检查const helpers = require('../../util/helpers');
exports.getInspectionDetail = (req, res, next) => {
const test = helpers.getLokasi();
console.log(test);
}
软件包的版本,并确保它是最新版本。其他人也有类似的问题:Getting error when try to use React Router v6: Attempted import error: 'Action' is not exported from 'history'