-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
Not working with hooks #45
Comments
Hi @MrBartusek I'm not able to reproduce this locally. I added a hook to the example and pushed it to Github. It builds successfully in the CI environment too. https://github.com/TimMikeladze/tsup-react-package-starter/actions I've seen this error before but in a specific case: I was using If this is indeed the case for you, then I suggest using https://github.com/wclr/yalc to handle the package linking process. This workaround solved this error for me and furthermore improved my overall development workflow since I started using As part of debugging I suggest you delete your node_modules and yarn.lock file and then running |
To be completely honest with you @TimMikeladze this single comment fixed all of the issues that I've been trying to resolve for a total of 18 hours (tracked by waketime). I've tried multiple tutorials, templates, webpack, babel, tsup, rollup and even some cursed stuff like build scripts or vite. The whole issue, as you have pointed out, was caused by links or other obscure importing methods. I've just published a package to npm and imported it straight from it, without messing with it locally. It works like a charm. Thank you so much, I can finally get some good sleep. |
@MrBartusek I am uplifted to hear that! I felt the same way when I stumbled upon a comment suggesting In fact this comment made me realize that Happy coding and glad I could help! |
Hey, adding hooks to this example does't work.
Chage
Example.tsx
to:The text was updated successfully, but these errors were encountered: