npm WARN ERESOLVE overriding peer dependency
npm WARN Found: bootstrap#3.4.1
npm WARN node_modules/#ivan/data-insights/node_modules/bootstrap
npm WARN bootstrap#"^3.3.7" from #ivan/data-insights#1.7.26
npm WARN node_modules/#ivan/data-insights
npm WARN #ivan/data-insights#"1.7.26" from the root project
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer bootstrap#"^4.3.1" from bootstrap-switch#3.4.0
npm WARN node_modules/#ivan/data-insights/node_modules/bootstrap-switch
npm WARN bootstrap-switch#"^3.4.0" from #ivan/data-insights#1.7.26
npm WARN node_modules/#ivan/data-insights
npm ERR! code FETCH_ERROR
npm ERR! errno FETCH_ERROR
npm ERR! invalid json response body at http://registry.npmjs.org/#babel%2fparser reason: Unexpected token d in JSON at position 103148
The Error's saying there exists already a version of bootstrap in your project. Try to remove bootstrap and install again. OR Remove the node_modules and run npm install again to install your packages.
I have already resolved this issue in the following way:
npm cache clean --force
and
npm cache verify
then
npm i npm#latest -g
and finally, I was able to run
npm i
The similar question was there: npm ERR! Unexpected end of JSON input while parsing near '...registry.npmjs.org/#i'
Related
I've been working on my react project and am unable to update or install new packages without my computer making a ton of noise. I know it has something to do with the versions of react-dom and react-router-dom but I am not sure the best way to fix it. I just don't want to screw anything up further. Any help or guidance is appreciated!
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: my-app#0.1.0
npm WARN Found: react#17.0.2
npm WARN node_modules/react
npm WARN peer react#"*" from #testing-library/react#11.2.7
npm WARN node_modules/#testing-library/react
npm WARN #testing-library/react#"^11.2.2" from the root project
npm WARN 5 more (mini-create-react-context, react-dom, react-router, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react#"17.0.2" from react-dom#17.0.2
npm WARN node_modules/react-dom
npm WARN peer react-dom#"*" from #testing-library/react#11.2.7
npm WARN node_modules/#testing-library/react
npm WARN 1 more (the root project)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: my-app#0.1.0
npm WARN Found: react#17.0.2
npm WARN node_modules/react
npm WARN peer react#"*" from #testing-library/react#11.2.7
npm WARN node_modules/#testing-library/react
npm WARN #testing-library/react#"^11.2.2" from the root project
npm WARN 5 more (mini-create-react-context, react-dom, react-router, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react#">=15" from react-router-dom#5.3.0
npm WARN node_modules/react-router-dom
npm WARN react-router-dom#"^5.2.0" from the root project
These errors popped up after deleting node_modules and package-lock.json.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: my-app#0.1.0
npm ERR! Found: react#undefined
npm ERR! node_modules/react
npm ERR! react#"^17.1.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#">=15" from react-router-dom#5.3.0
npm ERR! node_modules/react-router-dom
npm ERR! react-router-dom#"^5.2.0" 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 /Users/cherie/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
To update all packages to a new major version, install the npm-check-updates package globally:
npm install -g npm-check-updates
then run it:
ncu -u
this will upgrade all the version hints in the package.json file, to dependencies and devDependencies, so npm can install the new major version.
then run this :
npm update
The project has been setup using an older version of NodeJS and NPM, the package manager, so it was more lax about dependencies than the current version. When working with older projects, you can use a CLI flag:
npm install --legacy-peer-deps
Just like the error actually tells you. If that is not enough, and the project is just bad as far as dependencies go, you can also use the other flag it's proposing:
npm install --force
Both of those flags relax the dependency resolution checks to work more like older version of the package manager.
This way, you can at least install the project and then you can spent some time on maintenance to fix the issues with mismatched dependency versions and ranges.
Today I worked on a react web project. So it worked fine.And then after that I created a another react project. But in that there was no any package.lock file. So I created manually it by using npm install . But after that when I'm adding dependency to that project with npm i react-particles-js command I got a error msg like this.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: smart-parking-system#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!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^16.0.0" from react-particles-js#3.5.3
npm ERR! node_modules/react-particles-js
npm ERR! react-particles-js#"*" 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\User.LAPTOP-3EBUUP6S\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\User.LAPTOP-3EBUUP6S\AppData\Local\npm-cache\_logs\2021-09-02T11_17_21_426Z-debug.log
Also when I'm creating package.lock file manually I get this log message.
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm WARN deprecated sane#4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
npm WARN deprecated uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
changed 87 packages, and audited 1703 packages in 40s
So the problem is why I'm not getting a package.lock file automatically and why I can't install dependencies correctly?
It can be because creat-react-app is using yarn now.
Instead of npm install use yarn
Instead of npm i react-particles-js use yarn add react-particle-js
You can confirm if you have a yarn.lock file
I am getting errors trying to run npm install on a node/react app which I am taking over development of.
I'm not trying to install any packages globally. I am on an M1 Macbook Pro running Big Sur. I did a fresh install of node and npm with Homebrew. I also tried removing the package-lock.json file, cleaning the npm cache, and adding a .npmignore file to the directory as some other posts have suggested; none of these worked.
Here is the output when I run npm install
MacBook-Pro-2 frontend % npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [my project name]-dashboard#0.1.0
npm ERR! Found: webpack#5.39.0
npm ERR! node_modules/webpack
npm ERR! webpack#"5.39.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer webpack#"^4.0.0" from optimize-css-assets-webpack-plugin#6.0.0
npm ERR! node_modules/optimize-css-assets-webpack-plugin
npm ERR! optimize-css-assets-webpack-plugin#"6.0.0" 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 /Users/<name>/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/<name>/.npm/_logs/2021-06-15T17_41_19_910Z-debug.log
I tried to run npm install --legacy-peer-deps, which causes a slightly different error:
MacBook-Pro-2 frontend % npm install --legacy-peer-deps
npm WARN deprecated #hapi/topo#3.1.6: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated #hapi/pinpoint#1.0.2: Moved to 'npm install #sideway/pinpoint'
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated #hapi/formula#1.2.0: Moved to 'npm install #sideway/formula'
npm WARN deprecated topojson#3.0.2: Use topojson-client, topojson-server or topojson-simplify directly.
npm WARN deprecated #hapi/address#2.1.4: Moved to 'npm install #sideway/address'
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated #hapi/hoek#8.5.1: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated #hapi/joi#16.1.8: Switch to 'npm install joi'
npm ERR! code ENOENT
npm ERR! syscall chmod
npm ERR! path /Users/<name>/Developer/<directory>/frontend/node_modules/topojson/node_modules/topojson-simplify/bin/toposimplify
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, chmod '/Users/<name>/Developer/<directory>/frontend/node_modules/topojson/node_modules/topojson-simplify/bin/toposimplify'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/<name>/.npm/_logs/2021-06-15T17_41_57_785Z-debug.log
I solved my own problem. I think this is a common error message, with many potential solutions; here are 2 things I tried that fixed the issue for me:
Make sure you have postgresql installed (if your project includes a postgresql db, like mine). On a mac with homebrew, just run brew install postgresql.
I also downgraded my version of Node.js to the most up-to-date long term support version (previously I was using the dev version). At the time of writing the LTS version was 14.7.
After making these changes, I was able to get my site to install and start correctly.
I'm new on React and I'm trying to update my gatsby and its dependences but is not working.
On the terminal I have put npm outdated and I got this below.
Package Current Wanted Latest Location Depended by
gatsby 2.32.4 2.32.9 3.0.0 node_modules/gatsby form-gatsby
gatsby-plugin-sass 3.2.0 3.2.0 4.0.0 node_modules/gatsby-plugin-sass form-gatsby
gatsby-source-filesystem 2.11.1 2.11.1 3.0.0 node_modules/gatsby-source-filesystem form-gatsby
gatsby-transformer-remark 2.16.1 2.16.1 3.0.0 node_modules/gatsby-transformer-remark form-gatsby
react 16.13.1 16.14.0 17.0.1 node_modules/react form-gatsby
react-dom 16.13.1 16.14.0 17.0.1 node_modules/react-dom form-gatsby
When I tryind to run this: npm update I got this error below.
npm WARN using --force Recommended protections disabled.
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: graphql#15.5.0
npm WARN node_modules/graphql
npm WARN graphql#"^15.4.0" from gatsby#3.0.0
npm WARN node_modules/gatsby
npm WARN gatsby#"3.0.0" from the root project
npm WARN 6 more (gatsby-plugin-image, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer graphql#"^14.4.1" from express-graphql#0.9.0
npm WARN node_modules/express-graphql
npm WARN express-graphql#"^0.9.0" from gatsby#3.0.0
npm WARN node_modules/gatsby
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: gatsby#3.0.0
npm ERR! node_modules/gatsby
npm ERR! gatsby#"3.0.0" from the root project
npm ERR! peer gatsby#"^3.0.0-next.0" from gatsby-plugin-image#1.0.0
npm ERR! node_modules/gatsby-plugin-image
npm ERR! gatsby-plugin-image#"^1.0.0" from gatsby-source-contentful#5.0.0
npm ERR! node_modules/gatsby-source-contentful
npm ERR! gatsby-source-contentful#"^5.0.0" from the root project
npm ERR! 5 more (babel-plugin-remove-graphql-queries, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer gatsby#"^2.0.0" from gatsby-plugin-sass#3.2.0
npm ERR! node_modules/gatsby-plugin-sass
user#Users-MacBook-Pro form-gatsby % npm update
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: gatsby-starter-hello-world#0.1.0
npm ERR! Found: gatsby#2.32.9
npm ERR! node_modules/gatsby
npm ERR! gatsby#"^2.26.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer gatsby#"^3.0.0-next.0" from gatsby-plugin-sharp#3.0.0
npm ERR! node_modules/gatsby-plugin-sharp
npm ERR! gatsby-plugin-sharp#"^3.0.0" 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 /Users/user/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/user/.npm/_logs/2021-03-02T23_15_17_390Z-debug.log
I have tried to run npm install --force gatsby#3.0.0, but the same didn't work.
Do you guys any way I can update this?
Thanks so much.
Try to run npm install gatsby#latest
And only after that run npm outdated
It means the version you are trying to update to has been found
npm ERR! gatsby#"3.0.0" from the root project
Run gatsby -v to see if version is up to date
For me simply yarn upgrade worked.
I try to install module sqlite? but there is an error, what to do:
$ npm install sqlite3
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
sqlite3#5.0.0 install D:\CODE\21_data\node_modules\sqlite3
node-pre-gyp install --fallback-to-build
Node.js is only supported on Windows 8.1, Windows Server 2012 R2, or higher.
Setting the NODE_SKIP_PLATFORM_CHECK environment variable to 1 skips this
check, but Node.js might not execute correctly. Any issues encountered on
npm WARN enoent ENOENT: no such file or directory, open 'D:\CODE\21_data\package.json'
npm WARN 21_data No description
npm WARN 21_data No repository field.
npm WARN 21_data No README data
npm WARN 21_data No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 216
npm ERR! sqlite3#5.0.0 install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 216
npm ERR!
npm ERR! Failed at the sqlite3#5.0.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Thanks for answers!
Problems solved:
1.npm cache clean --force
2.delete node_modules folder
3.delete package-lock.json file
4.npm install