Webiu icon indicating copy to clipboard operation
Webiu copied to clipboard

npm install doesn't work on local IDE

Open sanjayk0508 opened this issue 3 years ago • 6 comments

Tried installing the dependences in my local IDE, so i can run the website on local host but it's shows error while installing npm

sanjayk0508 avatar Aug 09 '22 07:08 sanjayk0508

What kind of error? Can you elaborate a little?

gauravmishra193 avatar Feb 16 '23 09:02 gauravmishra193

@sanjayk0508 this happens sometimes to solve this issue u need to delete the package.lock.json file and npm i again to download all the dependends information of full content ,this happens when u fork or may be some of the dependences are the update . If u find any enquire ask me again

ANUSHRAV01 avatar Feb 22 '23 09:02 ANUSHRAV01

@ANUSHRAV01 , Hey I am getting same error. these are the errors "npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: @mui/[email protected] npm ERR! Found: [email protected] npm ERR! node_modules/react npm ERR! react@"^16.12.0" from the root project npm ERR! peer react@">=16.8.0" from @emotion/[email protected] npm ERR! node_modules/@emotion/react npm ERR! @emotion/react@"^11.10.4" from the root project npm ERR! peer @emotion/react@"^11.0.0-rc.0" from @emotion/[email protected] npm ERR! node_modules/@emotion/styled npm ERR! @emotion/styled@"^11.10.4" from the root project npm ERR! 3 more (@mui/material, @mui/styled-engine, @mui/system) npm ERR! 4 more (@mui/material, @mui/styled-engine, @mui/system, react-awesome-reveal) npm ERR! 10 more (@emotion/styled, @emotion/styled-base, ...) npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@"^17.0.0 || ^18.0.0" from @mui/[email protected] npm ERR! node_modules/@mui/material npm ERR! @mui/material@"^5.10.5" from the root project npm ERR! npm ERR! Conflicting peer dependency: [email protected] npm ERR! node_modules/react npm ERR! peer react@"^17.0.0 || ^18.0.0" from @mui/[email protected] npm ERR! node_modules/@mui/material npm ERR! @mui/material@"^5.10.5" 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\sapna\AppData\Local\npm-cache_logs\2023-02-26T16_46_11_911Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\sapna\AppData\Local\npm-cache_logs\2023-02-26T16_46_11_911Z-debug-0.log"

Can you please help me with this?

Sapnajha19 avatar Feb 26 '23 16:02 Sapnajha19

https://stackoverflow.com/questions/53545800/internal-modules-cjs-loader-js582-throw-err this is will help u with the node packages and for the material ui issue u need to import correctly from the source see whether they are compatible with your dependencies

ANUSHRAV01 avatar Feb 27 '23 07:02 ANUSHRAV01

@sanjayk0508 have you resolved it? can you tell what you did

Sapnajha19 avatar Feb 27 '23 17:02 Sapnajha19

@Sapnajha19 First, delete the package.lock.json file then it can be resolved by executing the following command before "npm install" i.e. npm config set legacy-peer-deps true then, execute the command "npm install"

aayanlobo avatar Mar 23 '23 19:03 aayanlobo