-
Notifications
You must be signed in to change notification settings - Fork 2
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
Importing my custom component in a Next 14 project #1
Comments
Thank your feed-back, Are u wrapping component like this on top or something else? https://www.npmjs.com/package/serif-ui-components i'm trying my package its work on next-js (v14 app router) |
Hi, I am using a page router. My goal is to create an SPA using the Next pages router. |
During my research I read somewhere that in order to use the component to be rendered on the client side, I would have to import the component's original file by fetching it from within node_modules. But this seemed strange to me and I didn't understand the best way to expose the file from within my package. |
I solved my issue. I was installing my package from my local environment using: Now I am using I didn't try to use it from an npm remote repository, but I hope to have the same behavior as the Thank you @serifcolakel |
Sorry, @serifcolakel, I haven't solved it yet. |
There seems to be an error with the |
When I am trying to import a component from my custom library in a Next 14 project, I am getting the following exception:
My current code is:
My custom component extends the https://ui.shadcn.com/ and the problem is related to the uses of the method React.useEffect.
The message printed in the console is:
My collected infos:
peerDependencies
to prevent this, but it seems to be not working.use client
notation to fix it without success.The text was updated successfully, but these errors were encountered: