-
Notifications
You must be signed in to change notification settings - Fork 5
fix: remove react from distributed bundle #104
Conversation
🎊 PR Preview 1b83f08 has been successfully built and deployed to https://iambumblehead-react-dropdown-now-preview-pr-104.surge.sh 🕐 Build time: 120.126s 🤖 By surge-preview |
please pull branch locally and let me know if it. works
if using npm 7 (npm i --legacy-peer-deps ) |
Still no luck. Same error. Invalid hook call in PS. Node 15.3 |
I just discovered this PR... I haven't tried running @dalmo3's sample app on the linux machine but I'll try it and see how it goes. There's a similar error that occurs when running storybook storybookjs/storybook#10662 (comment) but the error only occurs on the mac machine --storybook runs fine on the linux machine edit later on: same Invalid hook call error occurs on both machines, using @dalmo3's sample app
I also updated the sample app to use the exact same version of react and react-dom and so that would rule out mismatched versions of react-dom as causing the error, but possibly multiple versions of react are causing the error
many other people are recently affected by the same sort of problems facebook/react#13991 also related, this recent PR (by me) removed peerDependencies and maybe it needs to be re-added. I re-added it here locally but it did not resolve the error, {
"peerDependencies": {
"react": ">=16.8.3",
"react-dom": ">=16.8.3"
}
} |
still no issues for me
|
yup but this issue is from 2018. can you give detailed instructions and what you are using to test the issue |
This is a version of @dalmo3's app. To use it, unzip it and npm install && npm start. To test this branch there |
@lwhiteley the bottom, recent half of the discussion in that thread is from the last 30 days or so facebook/react#13991 (comment) |
in the bundle you have
also FYI npm 7 is very strict
ill have to use legacy-peer-deps |
ok now i reproduce. will continue from here later |
@lwhiteley yes you are right and my explanation above was maybe not very good. I downloaded the dependencies for the app, including react-dropdown-now 6.0.0, then I deleted react-dropdown-now and cloned this branch into the same location so that running npm start from the parent app finds the cloned instance of react-dropdown-now rather than the (deleted) version 6.0.0 |
hmm i didnt rebuild my local dist folder..will test again soon |
the @reach/router react dependency (from storybook) makes it impossible to control the react dependencies. We used the work-around described here reach/router#432 (comment) in order to install storybook with the react17 |
yup but when you install the component as a dependency, storybook isnt installed so something else is the issue |
so i confirmed that our bundle had a react version inside and this removes it..however your setup with npm link still has issue so ill fix this up and we do a patch release to test correctly |
k @iambumblehead .. you can do a patch release Thanks |
@lwhiteley your latest branch works here after removing react-dropdown-now's node modules directory
great! :) |
relates to #96