Recently was trying to install gulp-imagemin via NPM and ran into an error as NPM tried to install a dependency.
npm ERR! code ENOENT npm ERR! errno 34
Ends up NPM was looking at my project’s .gitignore file and this caused a conflict. Adding a .npmignore file fixed the issue and the NPM install worked like a charm.