keppelen / react-facebook-login

A Component React for Facebook Login
1.19k stars 405 forks source link

Installation error on react@17.0.1 #320

Open 19sajib opened 3 years ago

19sajib commented 3 years ago

I just tried to install this package by the command >> npm i react-facebook-login then I got the error shown below.

PS F:\Projects\MERN Stack\mern-boilerplate\client> npm i react-facebook-login npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: client@0.1.0 npm ERR! Found: react@17.0.1 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.0.0" from react-facebook-login@4.1.1
npm ERR! node_modules/react-facebook-login npm ERR! react-facebook-login@"*" 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 C:\Users\Sajib\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Sajib\AppData\Local\npm-cache_logs\2021-03-01T13_09_31_153Z-debug.log

Now is it will work if I use the command > npm i --force react-facebook-login or I have to go back to react@16.0.0 and if the command worked then there will be any problem?

mtiahrt commented 3 years ago

I also got this error running react 17.0.2. I used --legacy-peer-deps to complete the install. Will this support react 17?

hamdinawfel commented 3 years ago

npm install react react-dom react-facebook-login --save --force

kridafans commented 3 years ago

Using either --legacy-peer-deps or --force not working for me, getting below error:

Uncaught Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

Check the render method of `EventPage`.
    at createFiberFromTypeAndProps (react-dom.development.js:25058)
    at createFiberFromElement (react-dom.development.js:25086)
    at reconcileSingleElement (react-dom.development.js:14052)
    at reconcileChildFibers (react-dom.development.js:14112)
    at reconcileChildren (react-dom.development.js:16990)
    at updateHostComponent (react-dom.development.js:17632)
    at beginWork (react-dom.development.js:19080)
    at HTMLUnknownElement.callCallback (react-dom.development.js:3945)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:3994)
    at invokeGuardedCallback (react-dom.development.js:4056)
    at beginWork$1 (react-dom.development.js:23964)
    at performUnitOfWork (react-dom.development.js:22776)
    at workLoopSync (react-dom.development.js:22707)
    at renderRootSync (react-dom.development.js:22670)
    at performSyncWorkOnRoot (react-dom.development.js:22293)
    at react-dom.development.js:11327
    at unstable_runWithPriority (scheduler.development.js:468)
    at runWithPriority$1 (react-dom.development.js:11276)
    at flushSyncCallbackQueueImpl (react-dom.development.js:11322)
    at flushSyncCallbackQueue (react-dom.development.js:11309)
    at discreteUpdates$1 (react-dom.development.js:22420)
    at discreteUpdates (react-dom.development.js:3756)
    at dispatchDiscreteEvent (react-dom.development.js:5889)
mfghir commented 2 years ago

It works for me, thx a lot

Dawlz commented 2 years ago

Hello, what do I need to do to fix this? I have this same error

glcheetham commented 2 years ago

Echo my comment on #340 ....

Guys you can save yourself some hassle and use this package instead:

https://www.npmjs.com/package/@greatsumini/react-facebook-login

It's a well-typed and actively maintained fork of this project, with a similar API.

npm i @greatsumini/react-facebook-login

nmanikandan2016 commented 6 months ago

I'm still facing this issue "While resolving: react-facebook-login@4.1.1 Found: react@18.2.0 npm ERR! node_modules/react npm ERR! react@"^18.2.0" from the root project" I tried all the solutions mentioned above github does not build without errors, local project is working fine, any help is much appreciated.