I created an SPFx solution almost a month ago. That time, it was working fine, but today, it started getting the below error which was quite strange. After doingg lots of research, I got to know there was some malicious issue observed by NPM during the security check.
NPM security has decided to remove the "Flatmap-stream" and "
[email protected]" package. The official Note from NPM can be found
here.
On November 26, 2018, the npm package manager released security advisory 737 regarding the flatmap-stream package. It was determined that this package was malicious, and contained harmful code. In addition, the popular event-stream package was modified to make use of the harmful flatmap-stream package.
Error while using NPM Install -
Resolution
To fix this issue, you need to follow the below steps.
- Delete the node_modules folder.
- Delete the package-lock.json file.
- Run npm install.
That's it. Yes, this is very simple. I believe you have got the solution to this error now.