简体   繁体   中英

Cube.js React Hook React.useCallback has a missing dependency: 'pivotConfig'. +

I've been trying to create a simple dashboard with Cube.js using windows 10 and Mysql version 8.

I originally tried a Js backend, fought with the install for a few days, then tried a docker install but quit after a few hours of error messages, and now am back to the node.js backend. My guess is Cube.js isn't updated or maintained anymore.

Using

npx cubejs-cli create ihatecubejs -d whyamIstilltrying

I get:

 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

Then:

Compile Failed-
./src/components/Header.js
Attempted import error: 'withRouter' is not exported from 'react-router'.

is fixed with:

npm install react-router@5

npm install react-router-dom@5

Then a ton of warning messages (one being deprecated UUID (version 3.4)- it's not installed though) that are ignored.

running npm start dev in the project directory opens the dev panel and running 'generate scheme' creates a scheme for each of my 2 connected databases in the "cube.js_test\ihatecubejs\schema" folder but none of the variables in the database are carried over.

I manually enter a handful of variables in the schema and get a chart to show in the development panel. A chart is generated, incorrectly, and I specify that I want time to be ordered- which throws an error but works on refresh. Whatever.

Now to create a dashboard app with the one chart:

Error: " "category" is not a registered scale." or

装载轮确实烧坏了

The console says:

Compiled with warnings.

src\components\ChartRenderer.js Line 78:5: React Hook React.useCallback has a missing dependency: 'pivotConfig'. Either include it or remove the dependency array react-hooks/exhaustive-deps

But pivotConfig seems to be defined in the DashboardPage.js in the /src folder.

I can't figure it out and I'm gonna barf if I spend any more time on this. Any help is much appreciated.

I'm from the Cube dev team. Sorry to hear that you've had such an experience with Cube.

The first two preset dashboards seem to be fixed already. As for the others, they will be fixed soon. Also, it looks like we didn't have a chance to check how it works for Windows properly before.

I would recommend using Cube in Docker. Please see this blog post for details. Also, there's a migration guide.

Alternatively, you can try Cube Cloud. It's free to use for testing purposes and might be easier than using Docker.

Feel free to join us in Slack where you can get help much faster. Cube is definitely maintained, despite the fact that right now we are more focused on Docker and Cloud solutions.

As for dashboards, they seem to be fixed, I've tried them today. And as for the Cube, they still maintain it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM