Reputation: 398
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 [email protected] 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.
Upvotes: 0
Views: 204
Reputation: 2119
Not sure but i think imagemin does not accept images with names starts with + ?
see: in file app/images/+2px.png , maybe you can change the name of the image and do a test?
or remove the same to see if runs ok?
can be grunt-contrib-imagemin dependencies problem?
Fix npm permissions by following their own instructions: https://docs.npmjs.com/getting-started/fixing-npm-permissions
Delete project's node_modules/ folder
Restart
Reinstall node modules by running npm install at the projects folder.
you can try too:
npm uninstall grunt-contrib-imagemin
npm install grunt-contrib-imagemin
I hope I could help in something.
Upvotes: 0