js
js copied to clipboard
bug: Import issue when in test environment using vitest
Describe the bug
Error: Cannot find module '/node_modules/next/navigation' imported from /node_modules/@logto/next/lib/server-actions/index.js
Did you mean to import next/navigation.js?
Similar closed issue from the other library: https://github.com/refinedev/refine/issues/5846
Expected behavior
How to reproduce?
- import { getLogtoContext } from "@logto/next/server-actions"; in the server component
- render the component using vitest
Context
- [ ] Logto Cloud
- [+ ] Self-hosted, Logto version = 3.6.0
- [ ] Container (Docker image)
- [+ ] Raw Node.js