formsy-react icon indicating copy to clipboard operation
formsy-react copied to clipboard

Not working on latest React 18 version

Open elenaaleksovska-rldatix opened this issue 3 years ago • 7 comments

Hello, I tried to upgrade to react 18.

These are the npm react packages that I am using: "react": "^18.2.0", "react-document-title": "^2.0.3", "react-dom": "^18.2.0", "react-router-dom": "^5.3.3", "react-select": "^5.4.0"

when I delete node_modules and run npm install these are the errors I get:

image

Any suggestions?

elenaaleksovska-rldatix avatar Sep 05 '22 09:09 elenaaleksovska-rldatix

Can you try to add to your package.json peer dependency section your react (and react-dom) current package and version? Something like

  "peerDependencies": {
    "react": "18.2.0",
    "react-dom": "18.2.0"
  }

GhostyJade avatar Sep 15 '22 15:09 GhostyJade

I've tried, I got the same errors as in the screenshot.

elenaaleksovska-rldatix avatar Sep 15 '22 19:09 elenaaleksovska-rldatix

even in the resolutions object?


Da: Elena Aleksovska @.> Inviato: Thursday, September 15, 2022 9:29:31 PM A: formsy/formsy-react @.> Cc: GhostyJade @.>; Comment @.> Oggetto: Re: [formsy/formsy-react] Not working on latest React 18 version (Issue #684)

I've tried, I got the same errors as in the screenshot

— Reply to this email directly, view it on GitHubhttps://github.com/formsy/formsy-react/issues/684#issuecomment-1248522624, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJENIJTPUU5RBWEXXAZCYTLV6N2JXANCNFSM6AAAAAAQEZYV5Q. You are receiving this because you commented.Message ID: @.***>

GhostyJade avatar Sep 15 '22 20:09 GhostyJade

formsy accept only : ^16.0.0 || ^17.0.0 (check package). for now maybe u can use ==> npm config set legacy-peer-deps true. more information : https://stackoverflow.com/questions/66239691/what-does-npm-install-legacy-peer-deps-do-exactly-when-is-it-recommended-wh

AbdaliDahir avatar Oct 13 '22 16:10 AbdaliDahir

Can you test v2.3.0 version which added React 18 as peerDeps

felixmosh avatar Nov 08 '22 21:11 felixmosh

@felixmosh Yup it works. tested with ( React 18.2.0 - node v16.17.0 - npm v8.15.0 - formsy v2.3.0).

AbdaliDahir avatar Nov 09 '22 09:11 AbdaliDahir

Great, the installation is working. Can you check if there are any other issues?

felixmosh avatar Nov 09 '22 09:11 felixmosh