react-helmet-async icon indicating copy to clipboard operation
react-helmet-async copied to clipboard

Support for react-dom ^17

Open basvandriel opened this issue 5 years ago • 5 comments

After closing #119 the error below still occurs when trying to install this on a React 17 app.

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-dom
npm ERR!   react-dom@"^17.0.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react-dom@"^16.6.0" from [email protected]
npm ERR! node_modules/react-helmet-async
npm ERR!   react-helmet-async@"*" 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.
npm ERR!
npm ERR! See /home/bas/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/bas/.npm/_logs/2021-03-03T08_55_32_962Z-debug.log

Also, when using --force when installing the package, the peer dependencies are listed as below:

  "peerDependencies": {
    "react": "^16.6.0 || ^17",
    "react-dom": "^16.6.0"
  },

basvandriel avatar Mar 03 '21 09:03 basvandriel

Could it be that the react and react-dom peerDependencies in the package.json for this project are defined as "^17.0.0-0"?

Would changing them both to "^17.0.0" (without the "-0" suffix) resolve this issue?

romiem avatar Mar 03 '21 16:03 romiem

The error doesn't appear anymore on the react package. That's why I only changed it for react-dom. Hope to get this closed soon!

basvandriel avatar Mar 03 '21 16:03 basvandriel

I am going to push a version that removes the -0s from them

staylor avatar Mar 03 '21 17:03 staylor

Try this: https://www.npmjs.com/package/react-helmet-async/v/1.0.9

staylor avatar Mar 03 '21 17:03 staylor

That's done the job - thanks so much Scott!

romiem avatar Mar 03 '21 17:03 romiem