. Advertisement .
..3..
. Advertisement .
..4..
When you try to put in a new fsevents package, you easily get the warning npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected]. It’s a common error that show ups in many ways. What is the cause of it and how to solve it? In this article, we will find out what this problem is and view the answer to it. Read on it.
When do you encounter “npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected]” error?
The issue occurred when we tried to install the latest package, and here’s what we received.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\watchpack-chokidar2\node_modules\fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\@angular\compiler-cli\node_modules\fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\webpack-dev-server\node_modules\fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\karma\node_modules\fsevents):
How to fix “npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected]” error?
Method 1: Include the command in the “optionalDependencies”
You may include the command in the “optionalDependencies“: [] section of your.package.json file. If you want to execute a new install, this should eliminate the alerts, but you must ensure that you have the right version. Use the following command to do force install.
npm install -f
After you do as the above guide, your error will be completely solved.
Method 2: Ignore it
Excepting the solution mentioned above, there is another way for you to solve the error “npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected]”. It’s not required. Unless you’re creating on a Mac, you don’t need it. Let’s ignore it.
This method seems very simple, right? However, it works flawlessly for you. It will make your error disappear and your program will run well without any errors. So, what are you waiting without applying it? Let’s try it to get your desired results.
Conclusion
For our answer to npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] error, please let us see in the comment section if you have a better answer to the problem. We hope our blog post is useful. With this information, you should be able to handle this annoyance and a slew of other concerns when you design your application. Also, feel free to add any concerns related to the problem, as we are always here to help you answer. Thank you!
Read more
Leave a comment