Out application uses grunt-contrib-imagemin for minifying the images in the Angular JS development. The code for grunt-conntrib-imagemin seems to be different for Windows and Linux. The problem I am facing is, my team is doing the development on a Windows machine where everything works fine, however we also have a Jenkins build (which is on a Linux machine) for the application which is failing if we check-in the node_modules directory.
What should be the ideal solution? I can remove the node_modules from the repository, however as per various blogs it is suggested to check-in the node_modules https://web.archive.org/posts/nodemodules-in-git.html
PS: I am facing issue with imagemin@1.0.0 version, the error I am facing on Jenkins build is:
Warning: Error: spawn /global/apps/contint/build_server/jenkins/jobs/APP_TRUNK/workspace/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-optipng/node_modules/optipng-bin/vendor/optipng ENOENT in file app/images/+2px.png Use --force to continue.