Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] finefoods-client Sample is broken #5846

Closed
kainio opened this issue Apr 13, 2024 · 2 comments · Fixed by #5849 or #5850
Closed

[BUG] finefoods-client Sample is broken #5846

kainio opened this issue Apr 13, 2024 · 2 comments · Fixed by #5849 or #5850
Assignees
Labels
bug Something isn't working
Milestone

Comments

@kainio
Copy link

kainio commented Apr 13, 2024

Describe the bug

Getting this error from nextjs-router packages when visiting localhost:3000

Error: Cannot find module '/workspace/node_modules/next/router' imported from /workspace/node_modules/@refinedev/nextjs-router/dist/pages.mjs
Did you mean to import next/router.js?

Steps To Reproduce

  1. Create a new refine project from sample: npm create refine-app@latest -- --example finefoods-client
  2. cd finefoods-client
  3. npm run dev

Expected behavior

The routing should work as expected and the default page (root route) should be displayed on the browser

Packages

"dependencies": {
"@refinedev/cli": "^2.16.29",
"@refinedev/core": "^4.49.0",
"@refinedev/nextjs-router": "^6.0.2",
"@refinedev/react-table": "^5.6.8",
"@refinedev/simple-rest": "^5.0.4",
"@tanstack/react-table": "^8.2.6",
"gsap": "^3.8.0",
"js-confetti": "^0.9.0",
"next": "^14.1.0",
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
"devDependencies": {
"@types/node": "^18.16.2",
"@types/react": "^18.0.0",
"autoprefixer": "^10.4.1",
"postcss": "^8.1.4",
"tailwindcss": "^3.0.11",
"typescript": "^5.4.2"
}

Additional Context

It's a fresh installation no custom code has been added.

you can see the error even in codesandbox:
codesandbox

@kainio kainio added the bug Something isn't working label Apr 13, 2024
@kainio
Copy link
Author

kainio commented Apr 14, 2024

it's working when I downgraded @refinedev/nextjs-router to 6.0.1

"@refinedev/nextjs-router": "=6.0.1",

@aliemir
Copy link
Member

aliemir commented Apr 15, 2024

Hey @kainio sorry for the issue! Same issue is also discussed at #5831, I've opened up two PRs to fix this issue 🙏

@aliemir aliemir self-assigned this Apr 15, 2024
@aliemir aliemir added this to the May Release milestone May 3, 2024
@aliemir aliemir closed this as completed May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants