【发布时间】:2021-11-29 23:24:23
【问题描述】:
我一直在尝试使用 Windows 10 和 Mysql 版本 8 使用 Cube.js 创建一个简单的仪表板。
我最初尝试了一个 Js 后端,与安装斗争了几天,然后尝试了一个 docker install 但在几个小时的错误消息后退出,现在我回到了 node.js 后端。我的猜测是 Cube.js 不再更新或维护。
使用
npx cubejs-cli 创建 ihatecubejs -d 为什么amIstilltrying
我明白了:
npm WARN ERESOLVE overriding peer dependency npm WARN While resolving: dashboard-app@0.1.0 npm WARN Found: react@17.0.2 npm WARN node_modules/react npm WARN peer react@"*" from @testing-library/react@11.2.7 npm WARN node_modules/@testing-library/react npm WARN @testing-library/react@"^11.2.7" from the root project npm WARN 6 more (react-dom, react-scripts, the root project, ...) npm WARN npm WARN Could not resolve dependency: npm WARN peer react@"17.0.2" from react-dom@17.0.2 npm WARN node_modules/react-dom npm WARN peer react-dom@"*" from @testing-library/react@11.2.7 npm WARN node_modules/@testing-library/react npm WARN 3 more (the root project, @ant-design/compatible, antd) npm WARN ERESOLVE overriding peer dependency npm WARN While resolving: dashboard-app@0.1.0 npm WARN Found: react@17.0.2 npm WARN node_modules/react npm WARN peer react@"*" from @testing-library/react@11.2.7 npm WARN node_modules/@testing-library/react npm WARN @testing-library/react@"^11.2.7" from the root project npm WARN 6 more (react-dom, react-scripts, the root project, ...) npm WARN npm WARN Could not resolve dependency: npm WARN peer react@"17.0.2" from react-dom@17.0.2 npm WARN node_modules/react-dom npm WARN peer react-dom@"*" from @testing-library/react@11.2.7 npm WARN node_modules/@testing-library/react npm WARN 3 more (the root project, @ant-design/compatible, antd) npm WARN ERESOLVE overriding peer dependency npm WARN While resolving: dashboard-app@0.1.0 npm WARN Found: react@17.0.2 npm WARN node_modules/react npm WARN peer react@"*" from @testing-library/react@11.2.7 npm WARN node_modules/@testing-library/react npm WARN @testing-library/react@"^11.2.7" from the root project npm WARN 6 more (react-dom, react-scripts, the root project, ...) npm WARN npm WARN Could not resolve dependency: npm WARN peer react@"17.0.2" from react-dom@17.0.2 npm WARN node_modules/react-dom npm WARN peer react-dom@"*" from @testing-library/react@11.2.7 npm WARN node_modules/@testing-library/react npm WARN 3 more (the root project, @ant-design/compatible, antd) npm WARN deprecated core-js@1.2.7: core-js@<3.3 is no longer maintained and not
然后:
Compile Failed-
./src/components/Header.js
Attempted import error: 'withRouter' is not exported from 'react-router'.
固定为:
npm install react-router@5
npm install react-router-dom@5
然后是一吨被忽略的警告消息(一个被弃用的 UUID(版本 3.4)——虽然它没有安装)。
在项目目录中运行 npm start dev 会打开开发面板并运行“生成方案”为我的 2 个连接的数据库中的每一个创建一个方案 “cube.js_test\ihatecubejs\schema”文件夹,但数据库中的变量都没有被继承。
我在架构中手动输入了一些变量,并在开发面板中显示了一个图表。错误地生成了一个图表,并且我指定我想要订购时间 - 这会引发错误但在刷新时起作用。随便。
现在用一个图表创建仪表板应用程序:
错误:““类别”不是注册比例。”或
控制台说:
编译时带有警告。
src\components\ChartRenderer.js 第 78:5 行:React Hook React.useCallback 缺少依赖项:'pivotConfig'。任何一个 包含它或删除依赖数组 react-hooks/exhaustive-deps
但pivotConfig似乎是在/src文件夹的DashboardPage.js中定义的。
我想不通,如果我再花时间在这上面,我会呕吐的。非常感谢任何帮助。
【问题讨论】:
标签: javascript node.js reactjs npm cube.js