-
Notifications
You must be signed in to change notification settings - Fork 27.2k
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
Dev mode error: "originalFactory is undefined" when importing client component ("use client") from other package #43902
Comments
I have the same error running this repo in dev https://github.com/vercel/app-playground |
Possibly a Windows-only bug, just tested on a different machine with no issues.
What about you @Fluxium2006 ? |
Looks the same as #43854 , the bug is still present in canary.6 on Windows |
## Bug The app client entry key was in win32 slashes like `app\blog`, and when we add the new layer checking logic in #43197, `name.startsWith('app/')` doesn't work. Fixes #43854 Fixes #43902 <img width="862" alt="image" src="https://user-images.githubusercontent.com/4800338/207641886-08ffc159-0516-4609-9a1f-8c8693586122.png"> - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Verify canary release
Provide environment information
Which area(s) of Next.js are affected? (leave empty if unsure)
App directory (appDir: true)
Link to the code that reproduces this issue
Repro here: https://github.com/reiv/next-canary-test
To Reproduce
next dev
in theapps/web
Describe the Bug
(The repro is based on the turborepo starter, modified to use
appDir: true
as well as the latest canary.)Importing a React client component from a module outside of the Next app causes
TypeError: originalFactory is undefined
. This only occurs in dev mode, and seems to be limited to client components ("use client") - non-client components can be imported without error.The bug exists as of
13.0.7-canary.3
(13.0.7-canary.1
works fine).Expected Behavior
No error in dev mode.
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
The text was updated successfully, but these errors were encountered: