stormy-gold
stormy-gold9mo ago

Hi everyone! I'm new to refine and I want to explore more about the framework so I tried to open two

Hi everyone! I'm new to refine and I want to explore more about the framework so I tried to open two refine dev environment. But it seems that the default behavior refine devtools is designed to use port 5173. So the second server cannot be started because it won't use port other that 5173. Is there any workaround for this problem like manually config port number or turn off the devtools? Thank you!!
12 Replies
other-emerald
other-emerald9mo ago
uhh guys do you guys know how to reuse data querykey in data fetching ? i found that u can add useNewQueryKeys in refine components but no example how to use it
sensitive-blue
sensitive-blue8mo ago
Hi. I'm new to Refine. I'm trying to build docker container from Dockefile which freshly created by npm create refine-app@latest with Next.js. The error says failed to compute cache key: "/app/refine/.next/standalone" not found: not found Can anyone help out? If I add "output: 'standalone'" to next..config.mjs and docker build, I get failed to compute cache key: "/app/refine/public" not found: not found I have not idea what to do with it.
fair-rose
fair-rose8mo ago
I'm triying to make the store example running but I get this error at the startup:
store@1.0.0 start cross-env NODE_OPTIONS=--max_old_space_size=4096 PORT=8000 next dev
▲ Next.js 14.2.3 - Local: http://localhost:8000 - Environments: .env ✓ Starting... ✓ Ready in 2.8s ○ Compiling / ... ✓ Compiled / in 2.1s (2310 modules) ⨯ Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/hal/Dev/store/node_modules/next/link' imported from /Users/hal/Dev/store/node_modules/@refinedev/nextjs-router/dist/pages.mjs Did you mean to import next/link.js? Any idea why this is happening ?
rare-sapphire
rare-sapphire8mo ago
hey very off topic here but does anyone have any experience working with mongoDB Atlas specifically creating a serverless instance and http endpoints? I keep getting an error when I am just trying to insert something This is the function I am running
// This function is the endpoint's request handler.
exports = function({ query, headers, body}, response) {
const result = context.services
.get("mongodb-atlas")
.db("myDB")
.collection("myCollection")
.insertOne(JSON.parse(body.text()));

return result

};
// This function is the endpoint's request handler.
exports = function({ query, headers, body}, response) {
const result = context.services
.get("mongodb-atlas")
.db("myDB")
.collection("myCollection")
.insertOne(JSON.parse(body.text()));

return result

};
The error I get is: > error: Cannot access member 'mongodb' of undefined
national-gold
national-gold8mo ago
Hello, I started my first small Refine project ~5 months ago as a backend dev. Now I need to add some functionality, so I thought, let's first update all dependencies. I could update all minor versions without a problem using yarn upgrade, but when updating some major versions something broke regarding DataGrid. Now my question, what and when is the recommended way/time to upgrade? Should we just do it manually like I tried or is there some sort of common tool or combination of versions provided by Refine? When I create a new project using npm create refine-app@latest I see it does not contains the latest versions either. So should I wait then?
adverse-sapphire
adverse-sapphire8mo ago
can refine run with bun instead of node?
fascinating-indigo
fascinating-indigo8mo ago
hola
adverse-sapphire
adverse-sapphire8mo ago
Hi i have some questions - i know that there are many UIs there but why ant design is the default where it’s very slow? is not? - does refine use redux or zustand?
conventional-tan
conventional-tan8mo ago
There is no real default you pick your flavors Ant and MUI have the most examples though. It does not use redux or zustand it uses react query and reacts own context providers for state management.
ambitious-aqua
ambitious-aqua8mo ago
Good evening fine ladies and gentlemen, i have a question i would appreciate being solved. Whats the best way to handle custom requests on a resource? Say we have a resource called users, all with an edit/create/list/show actions. But the set/change password endpoint is a completely different one. The way i tackled it (which i believe is wrong) is to create another modal and call it via edit action. Took the data from the form and the id from the url and used the mutate of userCreate to make the post request following a reset and close of the modal. Now if its just that i dont mind it being a bit messy for something so small but i have a bunch of complex models i have to make next so i want to find the best practice. Am i on the right track or am i goo goo gaga dummy here?
adverse-sapphire
adverse-sapphire8mo ago
is ant design slow ? which design should i use ? better
Module '"/Users/Hos/work/refine/starter-vite/node_modules/@types/react/index"' can only be default-imported using the 'esModuleInterop' flagts(1259)
Module '"/Users/Hos/work/refine/starter-vite/node_modules/@types/react/index"' can only be default-imported using the 'esModuleInterop' flagts(1259)
whhy i have this ? why templates generated has errors import when build ? why this errors
src/App.tsx:1:10 - error TS2305: Module '"@refinedev/core"' has no exported member 'Authenticated'.

1 import { Authenticated, GitHubBanner, Refine } from "@refinedev/core";
~~~~~~~~~~~~~

src/App.tsx:1:25 - error TS2305: Module '"@refinedev/core"' has no exported member 'GitHubBanner'.

1 import { Authenticated, GitHubBanner, Refine } from "@refinedev/core";
~~~~~~~~~~~~

src/App.tsx:1:39 - error TS2305: Module '"@refinedev/core"' has no exported member 'Refine'.

1 import { Authenticated, GitHubBanner, Refine } from "@refinedev/core";
~~~~~~

src/App.tsx:6:3 - error TS2305: Module '"@refinedev/antd"' has no exported member 'ErrorComponent'.

6 ErrorComponent,
~~~~~~~~~~~~~~

src/App.tsx:7:3 - error TS2305: Module '"@refinedev/antd"' has no exported member 'ThemedLayoutV2'.

7 ThemedLayoutV2,
~~~~~~~~~~~~~~

src/App.tsx:8:3 - error TS2305: Module '"@refinedev/antd"' has no exported member 'ThemedSiderV2'.

8 ThemedSiderV2,
~~~~~~~~~~~~~

src/App.tsx:9:3 - error TS2305: Module '"@refinedev/antd"' has no exported member 'useNotificationProvider'.

9 useNotificationProvider,
~~~~~~~~~~~~~~~~~~~~~~~

src/App.tsx:92:35 - error TS7006: Parameter 'props' implicitly has an 'any' type.

92 Sider={(props) => <ThemedSiderV2 {...props} fixed />}
~~~~~

src/authProvider.ts:6:19 - error TS7031: Binding element 'username' implicitly has an 'any' type.

6 login: async ({ username, email, password }) => {
~~~~~~~~

src/authProvider.ts:6:29 - error TS7031: Binding element 'email' implicitly has an 'any' type.

6 login: async ({ username, email, password }) => {
src/App.tsx:1:10 - error TS2305: Module '"@refinedev/core"' has no exported member 'Authenticated'.

1 import { Authenticated, GitHubBanner, Refine } from "@refinedev/core";
~~~~~~~~~~~~~

src/App.tsx:1:25 - error TS2305: Module '"@refinedev/core"' has no exported member 'GitHubBanner'.

1 import { Authenticated, GitHubBanner, Refine } from "@refinedev/core";
~~~~~~~~~~~~

src/App.tsx:1:39 - error TS2305: Module '"@refinedev/core"' has no exported member 'Refine'.

1 import { Authenticated, GitHubBanner, Refine } from "@refinedev/core";
~~~~~~

src/App.tsx:6:3 - error TS2305: Module '"@refinedev/antd"' has no exported member 'ErrorComponent'.

6 ErrorComponent,
~~~~~~~~~~~~~~

src/App.tsx:7:3 - error TS2305: Module '"@refinedev/antd"' has no exported member 'ThemedLayoutV2'.

7 ThemedLayoutV2,
~~~~~~~~~~~~~~

src/App.tsx:8:3 - error TS2305: Module '"@refinedev/antd"' has no exported member 'ThemedSiderV2'.

8 ThemedSiderV2,
~~~~~~~~~~~~~

src/App.tsx:9:3 - error TS2305: Module '"@refinedev/antd"' has no exported member 'useNotificationProvider'.

9 useNotificationProvider,
~~~~~~~~~~~~~~~~~~~~~~~

src/App.tsx:92:35 - error TS7006: Parameter 'props' implicitly has an 'any' type.

92 Sider={(props) => <ThemedSiderV2 {...props} fixed />}
~~~~~

src/authProvider.ts:6:19 - error TS7031: Binding element 'username' implicitly has an 'any' type.

6 login: async ({ username, email, password }) => {
~~~~~~~~

src/authProvider.ts:6:29 - error TS7031: Binding element 'email' implicitly has an 'any' type.

6 login: async ({ username, email, password }) => {
genetic-orange
genetic-orange8mo ago
Hello, im quite a newbe for both Supabase, Refine and Next.js I have this simple file called api/messages.ts the file looks like:
import { supabase } from "@auth/context/supabase/lib";

export async function sendMessage() {
const user = await supabase.auth.getUser();

console.log(user);
}
import { supabase } from "@auth/context/supabase/lib";

export async function sendMessage() {
const user = await supabase.auth.getUser();

console.log(user);
}
and im getting the following error:
AuthSessionMissingError: Auth session missing!
AuthSessionMissingError: Auth session missing!
@auth/context/supabase/lib
import { createClient } from "@supabase/supabase-js";

import { SUPABASE_API } from "@config-global";

export const supabase = createClient(
`${SUPABASE_API.url}`,
`${SUPABASE_API.key}`,
);
import { createClient } from "@supabase/supabase-js";

import { SUPABASE_API } from "@config-global";

export const supabase = createClient(
`${SUPABASE_API.url}`,
`${SUPABASE_API.key}`,
);
i can query the database using supabase.from(.... but i want to query the database with the user permissions (because im using postgres RLS). what should i do next? thanks.