• FEATURES
  • PRICING
  • MARKETPLACE
  • CASE STUDIES
  • BLOG
  • Gradle deploy fails while running imagemin:dist

    Hi

    I am trying to install Openspecimen on CentOS 5.8.
    While issuing the command deploy, it exits with following error:

    Done, without errors.
    Warning: Running “imagemin:dist” (imagemin) task
    Fatal error: write EPIPE Use --force to continue.

        Aborted due to warnings.
    :grunt_build FAILED
    

    FAILURE: Build failed with an exception.

    What could be the issue.

    It is a first use of node and grunt for me. So, I am not sure whether I am missing on some dependency.

    [root@openspecimen node_modules]# grunt -version
    grunt-cli v1.2.0
    grunt v0.4.5

    node -v
    v6.4.0

    npm -v
    2.15.1

    Thanks
    Bindu

    Hi @bindu_rajesh,

    Could you please provide us with more details by running following commands

    go to OpenSpecimen’s www directory
    cd openspecimen/www

    get version of imagemin
    npm list grunt-contrib-imagemin

    run grunt build to show stack trace
    grunt build --stack

    Thanks,
    Chetan

    Hi Chetan

    Thanks for the response. I am herewith copying the output from the commands.

    npm list grunt-contrib-imagemin
    OpenSpecimen@2.0.0 /openspecimen/www
    âââ grunt-contrib-imagemin@0.9.1

    grunt build --stack
    Running “clean:dist” (clean) task
    >> 1 path cleaned.

    Running “wiredep:app” (wiredep) task

    Running “useminPrepare:html” (useminPrepare) task
    Configuration changed for concat, uglify, cssmin

    Running “concurrent:dist” (concurrent) task
    >> Warning: There are more tasks than your concurrency limit. After this limit
    >> is reached no further tasks will be run until the current tasks are
    >> completed. You can adjust the limit in the concurrent task options

    ** Running “copy:styles” (copy) task**
    ** Copied 34 files**

    ** Done, without errors.**
    ** Warning: Running “imagemin:dist” (imagemin) task**
    ** Fatal error: write EPIPE**
    ** Error: write EPIPE**
    ** at exports._errnoException (util.js:1026:11)**
    ** at WriteWrap.afterWrite (net.js:794:14) Use --force to continue.**

    ** Aborted due to warnings.**

    Thanks
    Bindu

    Hi @bindu_rajesh,

    Try reinstalling imagemin using the following commands
    go to OpenSpecimen’s www directory
    cd openspecimen/www

    uninstall imagemin
    npm uninstall grunt-contrib-imagemin

    clean npm cache so that it will download modules and not use the cached ones.
    npm cache clean

    install the imagemin package using the following command.
    npm install

    grunt build

    Please let me know if you face any issues.

    Thanks,
    Chetan

    Hi Chetan

    Thanks for the reply.
    I am getting following errors while executing npm install:

    . Use ‘npm ls graceful-fs’ to find it in the tree.
    npm WARN cannot run in wd gifsicle@3.0.3 node lib/install.js (wd=/openspecimen/www/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-gifsicle/node_modules/gifsicle)

    pngquant-bin@3.1.1 postinstall /openspecimen/www/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-pngquant/node_modules/pngquant-bin
    node lib/install.js

    â The /openspecimen/www/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-pngquant/node_modules/pngquant-bin/vendor/pngquant binary doesn’t seem to work correctly
    â pngquant pre-build test failed
    â
    ¹ compiling from source
    â Error: pngquant failed to build, make sure that libpng-dev is installed
    at ChildProcess.exithandler (child_process.js:206:12)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:852:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)

    jpegtran-bin@3.1.0 postinstall /openspecimen/www/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-jpegtran/node_modules/jpegtran-bin
    node lib/install.js

    â The /openspecimen/www/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-jpegtran/node_modules/jpegtran-bin/vendor/jpegtran binary doesn’t seem to work correctly
    â jpegtran pre-build test failed
    â
    ¹ compiling from source
    â Error: touch configure.ac aclocal.m4 configure Makefile.am Makefile.in && ./configure --disable-shared --prefix="/openspecimen/www/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-jpegtran/node_modules/jpegtran-bin/vendor" --bindir="/openspecimen/www/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-jpegtran/node_modules/jpegtran-bin/vendor" && make install
    Command failed: ./configure --disable-shared --prefix="/openspecimen/www/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-jpegtran/node_modules/jpegtran-bin/vendor" --bindir="/openspecimen/www/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-jpegtran/node_modules/jpegtran-bin/vendor"
    configure: error: no nasm (Netwide Assembler) found

    at ChildProcess.exithandler (child_process.js:206:12)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:852:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
    

    optipng-bin@3.1.2 postinstall /openspecimen/www/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-optipng/node_modules/optipng-bin
    node lib/install.js

    â The /openspecimen/www/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-optipng/node_modules/optipng-bin/vendor/optipng binary doesn’t seem to work correctly
    â optipng pre-build test failed
    â
    ¹ compiling from source
    â optipng built successfully
    grunt-contrib-imagemin@0.9.1 node_modules/grunt-contrib-imagemin
    âââ async@0.9.2
    âââ chalk@0.5.1 (ansi-styles@1.1.0, escape-string-regexp@1.0.5, supports-color@0.2.0, has-ansi@0.1.0, strip-ansi@0.3.0)
    âââ pretty-bytes@1.0.4 (get-stdin@4.0.1, meow@3.7.0)
    âââ imagemin@2.2.1 (get-stdin@3.0.2, optional@0.1.3, vinyl@0.4.6, stream-combiner@0.2.2, through2@0.6.5, concat-stream@1.5.1, meow@2.1.0, vinyl-fs@0.3.14, imagemin-svgo@3.0.3, imagemin-gifsicle@4.2.0, imagemin-pngquant@4.2.2, imagemin-jpegtran@4.3.2, imagemin-optipng@4.3.0)

    npm ls graceful-fs was executed. Would you like to see the output of the same?

    Thanks
    Bindu

    Hi @bindu_rajesh

    Please run following commands inside www directory:
    npm i --save-dev grunt-contrib-imagemin
    npm install gifsicle@1.0.3
    npm install

    Hope it will solve your issue.
    Please let me know if you face any issue.

    Hi

    Even after trying all these commands, I face errors.
    First command give error:
    The /opt/openspecimen/www/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-jpegtran/node_modules/jpegtran-bin/vendor/jpegtran binary doesn’t seem to work correctly
    â jpegtran pre-build test failed
    â
    ¹ compiling from source
    â Error: touch configure.ac aclocal.m4 configure Makefile.am Makefile.in && ./configure --disable-shared --prefix="/opt/openspecimen/www/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-jpegtran/node_modules/jpegtran-bin/vendor" --bindir="/opt/openspecimen/www/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-jpegtran/node_modules/jpegtran-bin/vendor" && make install
    Command failed: make install
    libtool: error: ignoring unknown tag NASM
    libtool: error: ignoring unknown tag NASM
    libtool: error: ignoring unknown tag NASM
    libtool: error: ignoring unknown tag NASM
    jchuff-sse2-64.asm:236: error: short jump is out of range
    jchuff-sse2-64.asm:247: error: short jump is out of range
    jchuff-sse2-64.asm:293: error: short jump is out of range
    jchuff-sse2-64.asm:302: error: short jump is out of range
    jchuff-sse2-64.asm:303: error: short jump is out of range
    jchuff-sse2-64.asm:308: error: short jump is out of range
    jchuff-sse2-64.asm:334: error: short jump is out of range
    jchuff-sse2-64.asm:337: error: short jump is out of range
    make[2]: *** [jchuff-sse2-64.lo] Error 1
    make[1]: *** [install] Error 2
    make: *** [install-recursive] Error 1

    at ChildProcess.exithandler (child_process.js:206:12)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:852:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
    

    npm WARN cannot run in wd gifsicle@3.0.3 node lib/install.js (wd=/opt/openspecimen/www/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-gifsicle/node_modules/gifsicle)

    If I try instalation of gifsicle@1.0.3, it gives following error:
    â pre-build test failed, compiling from source…

    â { Error: read ECONNRESET
    at exports._errnoException (util.js:1026:11)
    at TCP.onread (net.js:563:26) code: ‘ECONNRESET’, errno: ‘ECONNRESET’, syscall: ‘read’ }

    Is there any version dependency of OS ?
    I am installing openspecimen on CentOS 5.11.

    Thanks
    Bindu

    Hi there, I just wanted to let you know that this thread helped me in getting my deployment working. I was running into very similar issues as @bindu_rajesh, and a combination of @Chetan_Khilosiya and @Vinayaklonushte suggestions got me to a working position. Here are the following steps I took once I was in the www/ directory:
    npm install
    bower install
    sudo npm uninstall grunt-contrib-imagemin
    sudo npm cache clean
    sudo npm install
    sudo npm i --save-dev grunt-contrib-imagemin
    sudo npm install gifsicle@1.0.3
    sudo npm install
    sudo grunt build
    After this, I was able to run gradle deploy and it completed all steps successfully.
    Thanks all!

    Dear David_Kraemer

    Can you please tell me which is the version of Linux you are using.

    Thanks
    Bindu

    Hi @bindu_rajesh,

    Please do the following,
    go to www directory

    remove node modules directory.
    rm -r node_modules

    install libpng-devel package
    sudo yum install libpng-devel

    install node packages
    npm install

    run grunt build
    grunt build

    Please tell me how it goes.
    Thanks,
    Chetan

    Hi @bindu_rajesh,

    I am using Fedora 24 Workstation to spin up a test deployment of OpenSpecimen. I was also able to simplify commands that I posted earlier.

    navigate into www/ directory in $OS_HOME
    	sudo npm cache clean
    	sudo npm i --save-dev grunt-contrib-imagemin
    	sudo npm install gifsicle@1.0.3
    	sudo npm install
    	bower install
    	grunt build
    change directory to parent (cd ..)
    sudo gradle deploy

    Hi,

    I had the same type of problem. Here is my approach is similar to that of @David_Kraemer and it works on CentOS 7.

    « npm uninstall grunt-contrib-imagemin » in folder www/node_modules.
    « npm install gifsicle »
    « npm install grunt-contrib-imagemin »

    You can build or deploy now.

    Hi

    Thanks to all those who responded to my query. I tried all those suggestions, but I was facing same issues.
    I tried to git clone the latest version of openspecimen again to a different location on the same server.

    Again getting same issue.

    No clue on what the problem is:
    Here is a glimpse of the error:

    The /opt/openspecimen3.3/openspecimen/www/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-jpegtran/node_modules/jpegtran-bin/vendor/jpegtran binary doesn’t seem to work correctly
    ** â jpegtran pre-build test failed**
    ** â**
    ** ¹ compiling from source**
    ** â Error: touch configure.ac aclocal.m4 configure Makefile.am Makefile.in && ./configure --disable-shared --prefix="/opt/openspecimen3.3/openspecimen/www/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-jpegtran/node_modules/jpegtran-bin/vendor" --bindir="/opt/openspecimen3.3/openspecimen/www/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-jpegtran/node_modules/jpegtran-bin/vendor" && make install**
    Command failed: make install
    libtool: error: ignoring unknown tag NASM
    libtool: error: ignoring unknown tag NASM
    libtool: error: ignoring unknown tag NASM
    libtool: error: ignoring unknown tag NASM
    jchuff-sse2-64.asm:236: error: short jump is out of range
    jchuff-sse2-64.asm:247: error: short jump is out of range
    jchuff-sse2-64.asm:293: error: short jump is out of range
    jchuff-sse2-64.asm:302: error: short jump is out of range
    jchuff-sse2-64.asm:303: error: short jump is out of range
    jchuff-sse2-64.asm:308: error: short jump is out of range
    jchuff-sse2-64.asm:334: error: short jump is out of range
    jchuff-sse2-64.asm:337: error: short jump is out of range
    make[2]: *** [jchuff-sse2-64.lo] Error 1
    make[1]: *** [install] Error 2
    make: *** [install-recursive] Error 1

    ** at ChildProcess.exithandler (child_process.js:206:12)**
    ** at emitTwo (events.js:106:13)**
    ** at ChildProcess.emit (events.js:191:7)**
    ** at maybeClose (internal/child_process.js:852:16)**
    ** at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)**
    grunt-contrib-clean@0.6.0 node_modules/grunt-contrib-clean
    âââ rimraf@2.2.8

    It also throws a warning initially:

    npm WARN cannot run in wd gifsicle@3.0.4 node lib/install.js (wd=/opt/openspecimen3.3/openspecimen/www/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-gifsicle/node_modules/gifsicle)

    Do I need to try on a fresh system?

    Thanks
    Bindu

    Thanks to all those responded.
    I installed CentOS 7 and the installation went through without any issues.

    Request you to put the pre-requisites if there is any as far as Operating system is cocerned.

    Thanks
    Bindu