I can not do "npm install" to my project in React. When I running "npm install" i get error massage - reactjs

When I running "npm install" I get this Error message:
found 15369 vulnerabilities (15366 low, 3 high)
run `npm audit fix` to fix them, or `npm audit` for details
I tried to run "npm audit" and I get this error message:
found 15369 vulnerabilities (15366 low, 3 high) in 2153 scanned packages
run `npm audit fix` to fix 15366 of them.
3 vulnerabilities require manual review. See the full report for details.
I tried to run "npm audit fix --force"
and I get this error message:
fixed 15366 of 15369 vulnerabilities in 2153 scanned packages
3 vulnerabilities required manual review and could not be updated
I tried to delete my package-lock.json and delete node_modules folder,
and I Tried npm install again.
and I set this warning massage:
found 1 high severity vulnerability
run `npm audit fix` to fix them, or `npm audit` for details
Maybe you will know where the problem is?

This is not an error. It's a warning message. Should not affect your project to run most of the cases.

Try doing
npm update
It might solve the issue,
Try referring the official documentation Auditing package dependency.
Also it won't be a problem to run your project successfully

Maybe you have some problem with the internet connection or some filtering on the internet data?

It's a warning message. Don't worry.
npm start
And your your project will start on localhost

Hi I was facing similar problem, this worked for me.
Remove any kind of lock file package-lock.json in the local repo.
Remove local node_modules folder
Remove global node_modules folder, this can be found at %USERPROFILE%\Application Data\npm\node_modules.
Try running npm i again
If the solution doesn't work with npm and use yarn and install the packages atleast for now.

Check the packages' dependencies in package.json and package-lock.json. Sometimes this can be from depending on different versions of the same node package. You can try npm update first to try to update as much as possible automatically. If that does not work, find the conflicted versions.

Related

Download zip from github and run npm install in root

Any tips on how to resolve this? I am wanting to download the repo so I can make a modification.
When I open the unzipped folder in vscode and run npm install in the root I receive this error.
npm WARN deprecated tslint#6.1.3: TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information.
> lightweight-charts#4.0.0 postinstall
> npm run install-hooks
> lightweight-charts#4.0.0 install-hooks
> node scripts/githooks/install.js
It seems that it isn't a git repo. Did you use git to clone the repo? Skip installing git-hooks
added 654 packages, and audited 655 packages in 26s
154 packages are looking for funding
run `npm fund` for details
5 high severity vulnerabilities
To address issues that do not require attention, run:
npm audit fix
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
You can ignore the error since you didn't clone the repo but instead downloaded it as a zip file. You will still be able to build the library.
I would recommend reading the BUILDING.md file if you are getting started with developing for the library.
The git hooks are only used when creating a new commit, at which stage it will run some checks to ensure that the code passes a few linter rules.

Getting error after upgrading eslint version

I have setup eslint+prettier+husky in my react opensource project. When I ran npm start after setting up it is showing me this error message.
There might be a problem with the project dependency tree.
It is likely not a bug in Create React App, but something you need to fix locally.
The react-scripts package provided by Create React App requires a dependency:
"eslint": "^6.6.0"
Don't try to install it manually: your package manager does it automatically.
However, a different version of eslint was detected higher up in the tree:
/Users/rishipurwar/coding-space/node_modules/eslint (version: 7.32.0)
Manually installing incompatible versions is known to cause hard-to-debug issues.
If you would prefer to ignore this check, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.
That will permanently disable this message but you might encounter other issues.
To fix the dependency tree, try following the steps below in the exact order:
1. Delete package-lock.json (not package.json!) and/or yarn.lock in your project folder.
2. Delete node_modules in your project folder.
3. Remove "eslint" from dependencies and/or devDependencies in the package.json file in your project folder.
4. Run npm install or yarn, depending on the package manager you use.
In most cases, this should be enough to fix the problem.
If this has not helped, there are a few other things you can try:
5. If you used npm, install yarn (http://yarnpkg.com/) and repeat the above steps with it instead.
This may help because npm has known issues with package hoisting which may get resolved in future versions.
6. Check if /Users/rishipurwar/coding-space/node_modules/eslint is outside your project directory.
For example, you might have accidentally installed something in your home folder.
7. Try running npm ls eslint in your project folder.
This will tell you which other package (apart from the expected react-scripts) installed eslint.
If nothing else helps, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.
That would permanently disable this preflight check in case you want to proceed anyway.
P.S. We know this message is long but please read the steps above :-) We hope you find them helpful!
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! codingspace#0.1.0 start: `npm run watch:css && react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the codingspace#0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
Anyone please help me with this.
As stated in the error just try one of these
1. Delete package-lock.json (not package.json!) and/or yarn.lock in your project folder.
2. Delete node_modules in your project folder.
3. Remove "eslint" from dependencies and/or devDependencies in the package.json file in your project folder.
4. Run npm install or yarn, depending on the package manager you use.

Npm audit issue, keeps getting error again and again

Keeps getting this issue, in my new github repo, cleaned cache, again installed npm but nothing seem to work now, what should i do? how can i fix this?
even if i do npm audit fix it return with the following code again and again.
up to date, audited 1778 packages in 13s
49 packages are looking for funding
run `npm fund` for details
31 vulnerabilities (24 low, 3 moderate, 4 high)
To address issues that do not require attention, run:
npm audit fix
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
This is nothing to worry about. essentially what is happening is that there are some problems in the packages you're using.
essentially if you update them, they'll break something else so they're frozen in place unless the maintainers fix it.
if you want you can fix them yourself, but it is generally too much effort. nothing you can do about it except wait until they're fixed, that is, if the maintainers decide to fix them
Some of the errors require manual debugging and can't be fixed by npm itself. So you need to fix the issues yourself.
You can solve it with npm-force-resolution package
Add resolutions section with vulnarable dependency
"resolutions": {
"lodash": "^4.17.5"
}
Then run
rm -r node_modules
npx npm-force-resolutions
npm install

npm start is showing an issue with babel-eslint version

When i ran npm start command to start server for my react app created using npx create-react-app my-app, The following error is occuring.Please help me with the solution to clear the following bug.I have also tried all the steps mentioned below by it but the error was not cleared.
There might be a problem with the project dependency tree.
It is likely not a bug in Create React App, but something you need to fix locally.
The react-scripts package provided by Create React App requires a dependency:
"babel-eslint": "10.1.0"
Don't try to install it manually: your package manager does it automatically.
However, a different version of babel-eslint was detected higher up in the tree:
C:\Users\LENOVO\node_modules\babel-eslint (version: 9.0.0)
Manually installing incompatible versions is known to cause hard-to-debug issues.
If you would prefer to ignore this check, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.
That will permanently disable this message but you might encounter other issues.
To fix the dependency tree, try following the steps below in the exact order:
1. Delete package-lock.json (not package.json!) and/or yarn.lock in your project folder.
2. Delete node_modules in your project folder.
3. Remove "babel-eslint" from dependencies and/or devDependencies in the package.json file in your project folder.
4. Run npm install or yarn, depending on the package manager you use.
In most cases, this should be enough to fix the problem.
If this has not helped, there are a few other things you can try:
5. If you used npm, install yarn (http://yarnpkg.com/) and repeat the above steps with it instead.
This may help because npm has known issues with package hoisting which may get resolved in future versions.
6. Check if C:\Users\LENOVO\node_modules\babel-eslint is outside your project directory.
For example, you might have accidentally installed something in your home folder.
7. Try running npm ls babel-eslint in your project folder.
This will tell you which other package (apart from the expected react-scripts) installed babel-eslint.
If nothing else helps, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.
That would permanently disable this preflight check in case you want to proceed anyway.
P.S. We know this message is long but please read the steps above :-) We hope you find them helpful!
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! reactapp#0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the reactapp#0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\LENOVO\AppData\Roaming\npm-cache\_logs\2020-07-19T12_53_40_050Z-debug.log
create your application outside the Desktop folder.
This is because of the package versions installed in user directory. The line from the error mentions the overriding version in the global user directory.
C:\Users\LENOVO\node_modules\babel-eslint (version: 9.0.0)
Try updating the version in the node_modules folder in the user directory or remove these and maintain local node_modules based on each project requirements.
I found a possible solution, or at least this one worked well for me. npm install #babel/eslint-parser and then npm start . If this doesnt work, first try this:
Delete babel-eslint in your node-modules or
Search where you could find that one with npm ls babel-eslint,
I hope works for you. :)

Error from chokidar after reinstalling np,

I have a recurring issue with npm start.
First, it seems that every time after I removed everything in the src folder I will not be able to run npm start -- it will throw an error at start script.
I have been solving that problem with deleting node_modules and doing another npm install.
After that, npm start will run successfully, but it will give an error from chokiar saying that it's unable to watch my index.css and index.js.
Does anyone have a similar experience with this and have a solution?
I solved it by updating all packages to latest version.
To be safe, I deleted the the package-lock.json and the node_modules.
with
npx npm-check-updates -u
you will see the current and latest version.
run
npm install
to install the updates.
My Error from chokidar is gone. Hope it helps you too.

Resources