Dependency conflict error while running in localhost #330
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a bug in the syntax of the src>components>scrollupbutton>scrollupbutton.jsx file.
return ( currentYPos >= offsetHeight ? <div className="Scroll-Up-Wrapper"> <img className="Scroll-Up" onClick={scrollUpFn} src={scrollUp} alt="Scroll Up!" width="64" height="64" /> </div>, <></> )
error occurs at the last line. so the new code as follows
return ( <div> {currentYPos >= offsetHeight ? ( <div className="Scroll-Up-Wrapper"> <img className="Scroll-Up" onClick={scrollUpFn} src={scrollUp} alt="Scroll Up!" width="64" height="64" /> </div> ) : null} </div> )
Further there is a issue in installing NPM
which could be fixed by using the command npm install --force
When we run the command npm install it says :
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@"^0.14.9 || ^15.3.0 || ^16.0.0-rc || ^16.0" from [email protected] npm ERR! node_modules/react-select npm ERR! react-select@"^1.0.0-rc.10" 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! npm ERR! For a full report see: npm ERR! C:\Users\Dell\AppData\Local\npm-cache\_logs\2023-06-23T08_40_54_099Z-eresolve-report.txt
This Error in the terminal could be fixed by using the command:
npm install --force