Following warning is being thrown on npm install
command -
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.2 (node_modules\\rea
ct-
npm i -f
I'd like to repost some comments from this thread, where you can read up on the issue and the issue was solved.
This is exactly Angular's issue. Current package.json requires fsevent as not optionalDependencies but devDependencies. This may be a problem for non-OSX users.
Sometimes
Even if you remove it from package.json npm i still fails because another module has it as a peer dep.
So
if npm-shrinkwrap.json is still there, please remove it or try npm i -f
If you want to hide this warn, you just need to install fsevents as a optional dependency. Just execute:
npm i fsevents@latest -f --save-optional
..And the warn will no longer be a bother.
I had got this error, Linux system(Ubuntu) and This might happen when you run :
npm install
1) If the project is not present in your localdisk/computer, copy it to your computer and try again. So you get the permission to access folder (Just make sure you have access permission).
2) If you still get some warnings or errors, run:
npm audit fix
This will solve vulnerabilities in your dependencies and can help you fix a vulnerability by providing simple-to-run npm commands and recommendations for further troubleshooting.
Hope it helps!
I also had the same issue though am using MacOS. The issue is kind of bug. I solved this issue by repeatedly running the commands,
sudo npm cache clean --force
sudo npm uninstall
sudo npm install
One time it did not work but when I repeatedly cleaned the cache and after uninstalling npm, reinstalling npm, the error went off. I am using Angular 8 and this issue is common
I'm using, Angular CLI: 8.1.2 Node: 12.14.1 OS: win32 x64
Strangely, this helped me
npm cache clean --force
npm uninstall @angular/cli
npm install @angular/cli@8.1.2
Yes, it works when with the command npm install --no-optional
Using environment: