npm install doesn't work well at the beginning..

Rhamean3 years ago

Pardon me Sir,
What should I do to resolve the errors when I run "npm install" to add modules in modern folder?

here are some of them:

npm ERR! While resolving: traccar@0.1.0
npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR!   react@"^17.0.2" from the root project
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^0.14.0 || ^15.0.0 || 16.x" from react-container-dimensions@1.4.1
npm ERR! node_modules/react-container-dimensions
npm ERR!   react-container-dimensions@"^1.4.1" from the root project
Anton Tananaev3 years ago

Have you tried force?

Rhamean3 years ago

I hadn't try Sir,
As you suggested I just tried "npm install --force" this time and 2188 packages were added.
But I got "134 vulnerabilities (123 moderate, 10 high, 1 critical)"
Then I ran "npm audit fix" and after that "npm audit fix --force".
It seemed to be done, but the result of "npm start" was repeatedly thousands lines of error like this:
"Line 95:47: Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style" related to several files in src folder.
Nothing could be seen in "localhost:3000" on browser too.
...
I'm not sure what I have missed yet.
Is that because of I'm working on Windows 10?
Do I have to use it on linux?

Rhamean3 years ago

I have tried in linux this time and unfortunately there was the same problem.
Node version : 16.14.0
npm version : 8.5.0

Anton Tananaev3 years ago

Did you run it?

Rhamean3 years ago

No, It doesn't work yet.
I have cloned the last release this morning, nothing changed.
Thanks

Anton Tananaev3 years ago

I meant try to post on the forum.

Alex Rey3 years ago

try this :

npm install --legacy-peer-deps