-
Notifications
You must be signed in to change notification settings - Fork 50
Open
Labels
Description
Describe the bug
https://previewjs.com/docs/guides/nextjs
npm i previewjs/config-helper-nextjs doesn't work since the repo is not publicly available.
Using custom implementation below the automatic results in an error:
TypeError: Cannot redefine property: default
at Function.defineProperty ()
at http://localhost:3140/__previewjs__/Wrapper.tsx?import&t=1703848410741:6:8
Reproduction
- const router = useRouter() will give an error that router is not mounted
- Defined previewjs folder with Wrapper.tsx file.
- Code from the link above
Preview.js version
v1.27.3
Framework
^18
System Info
System:
OS: Windows 11 10.0.22621
CPU: (16) x64 12th Gen Intel(R) Core(TM) i5-12500H
Memory: 1.48 GB / 15.73 GB
Binaries:
Node: 20.10.0 - C:\Programs\nextjs\node.EXE
npm: 10.2.5 - C:\Programs\nextjs\npm.CMD
IDEs:
VSCode: 1.85.1 - C:\Programs\Microsoft VS Code\bin\code.CMD
Visual Studio: 17.7.34221.43 (Visual Studio Community 2022)
Browsers:
Edge: Chromium (119.0.2151.97)
Internet Explorer: 11.0.22621.1Used Package Manager
npm
Extension logs (useful for crashes)
No response
Preview logs (useful for rendering errors)
No response
Repo link (if available)
No response
Anything else?
No response
Reactions are currently unavailable