我已经克隆了the following repo.并按照说明进行操作。运行import {BrowserRouter as Router, Route, Switch} from "react-router-dom";
import Home from "./src/pages/Home";
import Dashboard from "./src/pages/Dashboard";
import SecondStep from "./src/pages/Roster/Creation/SecondStep";
import Login from "./src/components/auth/Login";
import FirstStep from "./src/pages/Roster/Creation/FirstStep";
import Show from "./src/pages/Roster/RosterItem/Show";
import Registration from "./src/components/auth/Registration";
import Lists from "./src/pages/Roster/RosterItem/Lists";
import Parameters from "./src/pages/Roster/Parameters";
import NotFound from "./src/pages/NotFound";
import React from "react";
import configureHistory from "./configureHistory";
function Routes() {
const history = configureHistory();
return(
<Router history={history}>
<Switch>
<Route path="/" exact component={Home} />
<Route path="/dashboard" exact component={Dashboard} />
<Route path="/step/second" exact component={SecondStep} />
<Route path="/login" exact component={Login} />
<Route path="/step/first" exact component={FirstStep} />
<Route path="/group" exact component={Show} />
<Route path="/register" exact component={Registration} />
<Route path="/group/lists" exact component={Lists} />
<Route path="/group/parameters" exact component={Parameters} />
<Route component={NotFound} />
</Switch>
</Router>
)
}
export default Routes;
安装必需的软件包时,出现一些错误,我认为下面的行是问题所在。
npm install
有人知道如何摆脱这个错误吗? 我已经检查过in the node canvas repo,并指出
请注意,libgif / giflib,librsvg和libjpeg是可选的,并且仅 如果分别需要GIF,SVG和JPEG支持,则为必填。
那为什么给我麻烦呢? 我还不确定是否需要对gif进行任何处理。如果在构建时不需要gif_lib,可以跳过吗? 预先感谢!