[英]I am getting a 404 error page after deploying my react app on Github (help please)
[英]I am getting this error when I deployed my React app on Github "Error: "line" is not a registered controller."
我创建了一个 React 应用程序,它在我的本地计算机上运行良好,但在 Github 中部署后,我收到以下错误:
"Error: "line" is not a registered controller."
我从 stackoverflow 阅读了多个解决方案,但没有一个解决了这个问题。 在这里您可以看到无效文章的链接。
Chart.js core.js:6162 错误错误:“行”不是注册的 controller
https://www.coder.work/article/7595319
有人有类似的问题吗? 我怎样才能修复这个错误
我找到了解决这个问题的方法。 我所要做的就是从 chart.js 导入它,然后从“react-chartjs-2”导入图表
import {
Chart as ChartJS,
LinearScale,
CategoryScale,
BarElement,
PointElement,
LineElement,
Legend,
Tooltip,
registerables as registerablesJS
} from "chart.js";
import { Chart} from "react-chartjs-2";
ChartJS.register(...registerablesJS);
ChartJS.register(
LinearScale,
CategoryScale,
BarElement,
PointElement,
LineElement,
Legend,
Tooltip
);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.