cube-js / cube-js/cube

The module @cubejs-client_react.js does not provide an export named 'isQueryPresent'

Open
#6,707 2 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
Rust
Stars
20.8k
Forks
2.1k
Avg merge
1d 10h
Merged PRs (30d)
203

Description

Hi, I'm following the steps of this guide: https://cube.dev/blog/react-dashboard-with-graphql

Everything is fine except that, when I navigate to explore page I get this error:
`SyntaxError: The requested module '/node_modules/.vite/deps/@cubejs-client_react.js?v=367a0cec' does not provide an export named 'isQueryPresent' (at ExplorePage.tsx:8:10)`

I'm importing the function as usual:
![image](https://github.com/cube-js/cube/assets/23610892/745c3da5-ab3c-42d7-823d-c41f78d39d89)
and then using it in the Add to dashboard button:
`disabled={!isQueryPresent(finalVizState.query || {})}`

VSCode is not giving any error, and I can see the exported method, so I don't know what's happening, any ideas?
![image](https://github.com/cube-js/cube/assets/23610892/8feade1b-6522-478a-8202-3ff32bdc6170)

Cube JS core and react versions:
```
"@cubejs-client/core": "0.32.22",
"@cubejs-client/react": "0.32.22",
```

Contributor guide

Open the contributing guide

Research direction

Start with the guide's ExplorePage.tsx import and reproduce the Vite error using @cubejs-client/core and @cubejs-client/react 0.32.22. Inspect the published exports for the React package; done means the documented Explore page loads and the Add to dashboard button can evaluate its disabled state without the missing-export error.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript, vite
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.