react-simple-snackbar
react-simple-snackbar copied to clipboard
Error with react@"^17.0.2"
node_modules/react npm ERR! react@"^17.0.2" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@"16.x" from [email protected] npm ERR! node_modules/react-simple-snackbar npm ERR! react-simple-snackbar@"^1.1.11" from the root project
hi am getting above with react 17
Just following up--has anyone found a solution to this?
same here:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR! react@"^17.0.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"16.x" from [email protected]
having this issue as well
also having the same issue
npm i react-simple-snackbar
npm i patch-package postinstall-postinstall --save-dev
edit file: node_modules/react-simple-snackbar/package.json
"peerDependencies": {
"react": "17.x",
"react-dom": "17.x"
},
npx patch-package --exclude 'nothing' react-simple-snackbar
Notice the created patches folder in the root of your directory?
Go back to your package.json and in the scripts add the script "postinstall": "patch-package"
I may edit this later as a cleaner implementation is definitely possible but I'm a bit tired right now.
i'm not sure, but it seems time to fix it :)
While it fixes the bug, I'd advise abandoning the library as the maintainer has not provided a solid fix for this in over 8 months
npm install --save react-simple-snackbar@latest --force
hopefully it will be fix issue
Please fix this error!
+1
I am having same problem
$ npm i react-simple-snackbar
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR! react@"^17.0.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"16.x" from [email protected]
npm ERR! node_modules/react-simple-snackbar
npm ERR! react-simple-snackbar@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
adding to @myrdstom solution:
npm i -D patch-package postinstall-postinstallnpm i react-simple-snackbar --force- edit peerDependencies file:
node_modules/react-simple-snackbar/package.json
"peerDependencies": {
"react": "17.x",
"react-dom": "17.x"
},
npx patch-package --exclude 'nothing' react-simple-snackbar- edit file
package-lock.json, search for react-simple-snackbar and updatepeerDependenciesalso here - add postinstall script to
package.json=>"postinstall": "patch-package"
npm install --legacy-peer-deps