Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grunt-contrib-imagemin install fails on windows 8 #109

Closed
Crowdopolis opened this issue Nov 7, 2013 · 44 comments
Closed

grunt-contrib-imagemin install fails on windows 8 #109

Crowdopolis opened this issue Nov 7, 2013 · 44 comments

Comments

@Crowdopolis
Copy link

npm install grunt-contrib-imagemin -g

Fails windows 8 x64

npm v 1.3.11
node v0.10.21
grunt v0.4.1

npm install grunt-contrib-imagemin -g

npm http GET http://registry.npmjs.org/grunt-contrib-imagemin
npm http 304 http://registry.npmjs.org/grunt-contrib-imagemin
npm http GET http://registry.npmjs.org/jpegtran-bin
npm http GET http://registry.npmjs.org/filesize
npm http GET http://registry.npmjs.org/gifsicle
npm http GET http://registry.npmjs.org/optipng-bin
npm http GET http://registry.npmjs.org/pngquant-bin
npm http GET http://registry.npmjs.org/chalk
npm http 304 http://registry.npmjs.org/filesize
npm http 304 http://registry.npmjs.org/jpegtran-bin
npm http 304 http://registry.npmjs.org/optipng-bin
npm http 304 http://registry.npmjs.org/gifsicle
npm http 304 http://registry.npmjs.org/pngquant-bin
npm http 304 http://registry.npmjs.org/chalk
npm http GET http://registry.npmjs.org/ansi-styles
npm http GET http://registry.npmjs.org/has-color
npm http GET http://registry.npmjs.org/bin-wrapper
npm http 304 http://registry.npmjs.org/ansi-styles
npm http 304 http://registry.npmjs.org/bin-wrapper
npm http 304 http://registry.npmjs.org/has-color
npm http GET http://registry.npmjs.org/download
npm http GET http://registry.npmjs.org/isbin/0.0.2
npm http GET http://registry.npmjs.org/mout
npm http GET http://registry.npmjs.org/progress
npm http GET http://registry.npmjs.org/which
npm http 304 http://registry.npmjs.org/download
npm http 304 http://registry.npmjs.org/mout
npm http 304 http://registry.npmjs.org/which
npm http 304 http://registry.npmjs.org/isbin/0.0.2
npm http 304 http://registry.npmjs.org/progress
npm http GET http://registry.npmjs.org/mkdirp
npm http GET http://registry.npmjs.org/decompress
npm http GET http://registry.npmjs.org/through2
npm http GET http://registry.npmjs.org/async-foreach
npm http GET http://registry.npmjs.org/request
npm http GET http://registry.npmjs.org/async/0.1.22
npm http 304 http://registry.npmjs.org/mkdirp
npm http 304 http://registry.npmjs.org/through2
npm http 304 http://registry.npmjs.org/request
npm http 304 http://registry.npmjs.org/async-foreach
npm http 304 http://registry.npmjs.org/decompress
npm http 304 http://registry.npmjs.org/async/0.1.22
npm http GET http://registry.npmjs.org/adm-zip
npm http GET http://registry.npmjs.org/rimraf
npm http GET http://registry.npmjs.org/stream-combiner
npm http GET http://registry.npmjs.org/tar
npm http GET http://registry.npmjs.org/temp
npm http GET http://registry.npmjs.org/xtend
npm http GET http://registry.npmjs.org/readable-stream
npm http 304 http://registry.npmjs.org/adm-zip
npm http 304 http://registry.npmjs.org/stream-combiner
npm http 304 http://registry.npmjs.org/temp
npm http 304 http://registry.npmjs.org/rimraf
npm http 304 http://registry.npmjs.org/tar
npm http 304 http://registry.npmjs.org/xtend
npm http 304 http://registry.npmjs.org/readable-stream
npm http GET http://registry.npmjs.org/duplexer
npm http GET http://registry.npmjs.org/graceful-fs
npm http GET http://registry.npmjs.org/is-object
npm http GET http://registry.npmjs.org/object-keys
npm http GET http://registry.npmjs.org/osenv/0.0.3
npm http 304 http://registry.npmjs.org/duplexer
npm http 304 http://registry.npmjs.org/graceful-fs
npm http 304 http://registry.npmjs.org/object-keys
npm http 304 http://registry.npmjs.org/is-object
npm http 304 http://registry.npmjs.org/osenv/0.0.3
npm WARN deprecated [email protected]: Please update to the latest object-keys
npm http GET http://registry.npmjs.org/indexof
npm http GET http://registry.npmjs.org/foreach
npm http GET http://registry.npmjs.org/is
npm http 304 http://registry.npmjs.org/indexof
npm http 304 http://registry.npmjs.org/is
npm http 304 http://registry.npmjs.org/foreach
npm http GET http://registry.npmjs.org/inherits
npm http GET http://registry.npmjs.org/block-stream
npm http GET http://registry.npmjs.org/fstream
npm http 304 http://registry.npmjs.org/fstream
npm http 304 http://registry.npmjs.org/block-stream
npm http 304 http://registry.npmjs.org/inherits
npm http GET http://registry.npmjs.org/forever-agent
npm http GET http://registry.npmjs.org/tunnel-agent
npm http GET http://registry.npmjs.org/http-signature
npm http GET http://registry.npmjs.org/aws-sign
npm http GET http://registry.npmjs.org/oauth-sign
npm http GET http://registry.npmjs.org/node-uuid
npm http GET http://registry.npmjs.org/cookie-jar
npm http GET http://registry.npmjs.org/form-data
npm http GET http://registry.npmjs.org/mime
npm http GET http://registry.npmjs.org/qs
npm http GET http://registry.npmjs.org/json-stringify-safe
npm http GET http://registry.npmjs.org/hawk
npm http 304 http://registry.npmjs.org/http-signature
npm http 304 http://registry.npmjs.org/forever-agent
npm http 304 http://registry.npmjs.org/oauth-sign
npm http 304 http://registry.npmjs.org/tunnel-agent
npm http 304 http://registry.npmjs.org/aws-sign
npm http 304 http://registry.npmjs.org/node-uuid
npm http 304 http://registry.npmjs.org/form-data
npm http 304 http://registry.npmjs.org/cookie-jar
npm http 304 http://registry.npmjs.org/mime
npm http 304 http://registry.npmjs.org/qs
npm http 304 http://registry.npmjs.org/json-stringify-safe
npm http 304 http://registry.npmjs.org/hawk
npm http GET http://registry.npmjs.org/combined-stream
npm http GET http://registry.npmjs.org/async
npm http 304 http://registry.npmjs.org/async
npm http GET http://registry.npmjs.org/assert-plus/0.1.2
npm http GET http://registry.npmjs.org/asn1/0.1.11
npm http GET http://registry.npmjs.org/ctype/0.5.2
npm http 304 http://registry.npmjs.org/combined-stream
npm http 304 http://registry.npmjs.org/asn1/0.1.11
npm http 304 http://registry.npmjs.org/ctype/0.5.2
npm http 304 http://registry.npmjs.org/assert-plus/0.1.2
npm http GET http://registry.npmjs.org/delayed-stream/0.0.5
npm http 304 http://registry.npmjs.org/delayed-stream/0.0.5
npm http GET http://registry.npmjs.org/boom
npm http GET http://registry.npmjs.org/cryptiles
npm http GET http://registry.npmjs.org/hoek
npm http GET http://registry.npmjs.org/sntp
npm http 304 http://registry.npmjs.org/sntp
npm http 304 http://registry.npmjs.org/cryptiles
npm http 304 http://registry.npmjs.org/boom
npm http 304 http://registry.npmjs.org/hoek

[email protected] postinstall
...\npm\node_modules\grunt-contrib-imagemin\node_modules\gifsicle
node lib/check.js

[email protected] postinstall C:\Users\Mopholo\AppData\Roaming\npm\node_modules\grunt-contrib-imagemin\node_modules\jpegtran-bin
node lib/check.js

gifsicle.exe: downloading [==== ] 25% 0.2s

[email protected] postinstall C:\Users\Mopholo\AppData\Roaming\npm\node_modules\grunt-contrib-imagemin\node_modules\optipng-bin
node lib/check.js

gifsicle.exe: downloading [===================] 100% 0.0s

√ pre-build test passed successfully
libjpeg-62.dll: downloading [=== ] 18% 0.2s

[email protected] postinstall C:\Users\Mopholo\AppData\Roaming\npm\node_modules\grunt-contrib-imagemin\node_modules\pngquant-bin
node lib/check.js

libjpeg-62.dll: downloading [===================] 100% 0.0s

libjpeg-62.dll: downloading [===== ] 28% 0.7s? pre-build test failed, compiling from source...

C:\Users\Mopholo\AppData\Roaming\npm\node_modules\grunt-contrib-imagemin\node_modules\jpegtran-bin\lib\check.js:19
throw new Error('building is not supported on ' + process.platform);
^
Error: building is not supported on win32
at C:\Users\Mopholo\AppData\Roaming\npm\node_modules\grunt-contrib-imagemin\node_modules\jpegtran-bin\lib\check.js:19:10
at ChildProcess. (C:\Users\Mopholo\AppData\Roaming\npm\node_modules\grunt-contrib-imagemin\node_modules\jpegtran-bin\node_modules\bin-wrapper\bin-wrapper.js:168:16)
at ChildProcess.EventEmitter.emit (events.js:95:17)
at Process.ChildProcess._handle.onexit (child_process.js:787:12)

module.js:340
throw err;
^
Error: Cannot find module 'chalk'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (C:\Users\Mopholo\AppData\Roaming\npm\node_modules\grunt-contrib-imagemin\node_modules\optipng-bin\lib\check.js:4:13)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)

module.js:340
throw err;
^
Error: Cannot find module 'chalk'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (C:\Users\Mopholo\AppData\Roaming\npm\node_modules\grunt-contrib-imagemin\node_modules\pngquant-bin\lib\check.js:4:13)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
npm ERR! weird error 8
npm ERR! not ok code 0

C:\Users\Mopholo>npm install grunt-contrib-imagemin -g

@youcandanch
Copy link

Duplicate of #108. It's an issue with jpegtran's latest version.

@argentinaluiz
Copy link

Me too.

@GEMI
Copy link

GEMI commented Nov 9, 2013

Windows 7 Ultimate 64bit, same problem. jpegtran-bin -> "building is not supported". How do I solve this? I tried copying files manually but it didn't work, I just got an error saying that the folder is not empty :)

@youcandanch
Copy link

@GEMI, in your application's package.json, add "jpegtran-bin": "0.2.0" before the reference for imagemin, and blow away your node_module folder locally. Then run npm install again.

@meelan
Copy link

meelan commented Nov 9, 2013

Awesome that worked, thanks @alexdancho ,,, im running windows 7 64 bit btw

@jricaldi
Copy link

@alexdancho yes its works, thanks so much, I think the new version of jpegtran-bin has problems

@gijagu
Copy link

gijagu commented Nov 12, 2013

It doesn´t work, I have added "jpegtran-bin": "0.2.0" to package.json. please somebody can help me

{
"name": "ejemplo",
"version": "0.0.0",
"dependencies": {},
"devDependencies": {
"grunt": "~0.4.1",
"grunt-autoprefixer": "~0.4.0",
"grunt-concurrent": "~0.4.1",
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-coffee": "~0.7.0",
"grunt-contrib-compass": "~0.6.0",
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-connect": "~0.5.0",
"grunt-contrib-copy": "~0.4.1",
"grunt-contrib-cssmin": "~0.7.0",
"grunt-contrib-htmlmin": "~0.1.3",
"jpegtran-bin": "~0.2.0",
"grunt-contrib-imagemin": "~0.3.0",
"grunt-contrib-jshint": "~0.7.1",
"grunt-contrib-uglify": "~0.2.0",
"grunt-contrib-watch": "~0.5.2",
"grunt-google-cdn": "~0.2.0",
"grunt-ngmin": "~0.0.2",
"grunt-rev": "~0.1.0",
"grunt-svgmin": "~0.2.0",
"grunt-usemin": "~2.0.0",
"jshint-stylish": "~0.1.3",
"load-grunt-tasks": "~0.2.0",
"time-grunt": "~0.2.0",
"karma-ng-scenario": "~0.1.0",
"grunt-karma": "~0.6.2",
"karma-firefox-launcher": "~0.1.0",
"karma-script-launcher": "~0.1.0",
"karma-chrome-launcher": "~0.1.0",
"karma-html2js-preprocessor": "~0.1.0",
"karma-requirejs": "~0.1.0",
"karma-jasmine": "~0.1.3",
"karma-coffee-preprocessor": "~0.1.0",
"karma-phantomjs-launcher": "~0.1.0",
"karma": "~0.10.4",
"karma-ng-html2js-preprocessor": "~0.1.0"
},
"engines": {
"node": ">=0.8.0"
},
"scripts": {
"test": "grunt test"
}
}

@abiyasa
Copy link

abiyasa commented Nov 14, 2013

@gijagu I use Windows 7 64 bit and here's my workaround:

  • You don't have to add "jpegtran-bin": "0.2.0" to package.json
  • Remove node_modules folder if necessary
  • Do npm install [email protected]
  • Do npm install

It worked for me.

@dduehr
Copy link

dduehr commented Nov 15, 2013

@alexdancho: Worked perfectly on Windows 8.1 64-Bit, thanks!!!

@youcandanch
Copy link

So it should be fixed now with imagemin/jpegtran-bin#38. I'm testing on our CI server now.

yosz referenced this issue in oswaldoacauan/ghostium Nov 21, 2013
@gijagu
Copy link

gijagu commented Nov 27, 2013

It does not work.
geyt7ka

I use Windows 8 32bits

@Guuz
Copy link

Guuz commented Nov 27, 2013

I get the same error as @gijagu.

@stefanbuck
Copy link

The bug is fixed but there isn't a new version available in the npm registry see

@fabiobiondi
Copy link

Thanx to abiyasa for the advice.

On Windows 8.1 64 bit I have to use

npm install [email protected] <-- OK

while adding it to the package.json doesn't work :(

.... (package.json) ...

"jpegtran-bin": "~0.2.0", <-- ERROR
"grunt-contrib-imagemin": "~0.4.0",


DaftMonk added a commit to angular-fullstack/generator-angular-fullstack that referenced this issue Dec 22, 2013
npm install sometimes freezes when installing imagemin for windows users.
Using older version of jpegtran fixes this.

gruntjs/grunt-contrib-imagemin#109
@chrislachance
Copy link

I just had the same issue as @gijagu because I had "jpegtran-bin": "~0.2.0"
Once I changed it to "jpegtran-bin": "0.2.0", it worked fine.

@brunomarcel
Copy link

i had this error "libjpeg-62.dll pre-build test failed", i used this command
"npm install [email protected]" after "npm install gulp-imagemin" it worked fine for me in Windows8 64 bit.

@Yankovsky
Copy link

I face this problem with latest version of imagemin. Not only jpegtran-bin package, but gifsicle and optipng-bin are fail to install correctly. I solved problem by specifying old package versions in pacakge.json:
"optipng-bin": "0.3.1",
"jpegtran-bin": "0.2.3",
"gifsicle": "0.1.4"
These are the latest packages versions without "building is not supported on win32" problem.
Windows 8x64

@lhwparis
Copy link

this is not fixed. why isnt it reopend?
i can confirm the same issue with windows 8.1 x64

@kevva
Copy link
Member

kevva commented Mar 22, 2014

@lhwparis, which version?

@xphong
Copy link

xphong commented Mar 22, 2014

Had the "building is not supported on win32" issue on jpegtran gifsicle optipng.

I fixed it by using @abiyasa and @Yankovsky solutions.
Adding the dependencies didn't work for me so I did:
npm install [email protected]
npm install [email protected]
npm install [email protected]

Using Windows 7 x32

@lhwparis
Copy link

0.4.1 and 0.5 i have tested it now with 0.6-pre too. still the same issues:
"building is not supported on win32" issue on jpegtran gifsicle optipng.
on windows8.1 x64
this is not resolved!

@vladikoff
Copy link
Member

Try version 0.6.0-pre by installing it from GitHub via npm install gruntjs/grunt-contrib-imagemin
Please report any errors you get with a full error log, operating system, version of Node.JS.

Once we are sure 0.6.0-pre works well, we are going to publish it.

@vladikoff
Copy link
Member

@lhwparis while you get ""building is not supported on win32"", does the plugin work?

@kevva I ran the tests on Windows even with ""building is not supported on win32"", should we just hide the error?

@simon-lifelike
Copy link

Still doesn't work with 0.6.0-pre on Windows 8.1 x64

$ node --version
v0.10.26
$ npm install gruntjs/grunt-contrib-imagemin
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/filesize
npm http GET https://registry.npmjs.org/chalk
npm http GET https://registry.npmjs.org/image-min
npm http 304 https://registry.npmjs.org/async
npm http 304 https://registry.npmjs.org/image-min
npm http 304 https://registry.npmjs.org/filesize
npm http 304 https://registry.npmjs.org/chalk
npm http GET https://registry.npmjs.org/has-color
npm http GET https://registry.npmjs.org/ansi-styles
npm http GET https://registry.npmjs.org/strip-ansi
npm http GET https://registry.npmjs.org/concat-stream
npm http GET https://registry.npmjs.org/mout
npm http GET https://registry.npmjs.org/jpegtran-bin
npm http GET https://registry.npmjs.org/optipng-stream-bin
npm http GET https://registry.npmjs.org/pngquant-bin
npm http GET https://registry.npmjs.org/multipipe/0.0.2
npm http GET https://registry.npmjs.org/stream-combiner/0.0.4
npm http GET https://registry.npmjs.org/through2
npm http GET https://registry.npmjs.org/gifsicle
npm http 304 https://registry.npmjs.org/has-color
npm http 304 https://registry.npmjs.org/strip-ansi
npm http 304 https://registry.npmjs.org/mout
npm http 304 https://registry.npmjs.org/concat-stream
npm http 304 https://registry.npmjs.org/ansi-styles
npm http 304 https://registry.npmjs.org/pngquant-bin
npm http 304 https://registry.npmjs.org/jpegtran-bin
npm http 304 https://registry.npmjs.org/optipng-stream-bin
npm http 304 https://registry.npmjs.org/multipipe/0.0.2
npm http 304 https://registry.npmjs.org/through2
npm http 304 https://registry.npmjs.org/stream-combiner/0.0.4
npm http 304 https://registry.npmjs.org/gifsicle
npm http GET https://registry.npmjs.org/tmp
npm http GET https://registry.npmjs.org/optipng-bin
npm http GET https://registry.npmjs.org/bin-wrapper
npm http GET https://registry.npmjs.org/duplexer
npm http GET https://registry.npmjs.org/duplexer2/0.0.1
npm http GET https://registry.npmjs.org/readable-stream
npm http GET https://registry.npmjs.org/xtend
npm http GET https://registry.npmjs.org/inherits
npm http GET https://registry.npmjs.org/typedarray
npm http GET https://registry.npmjs.org/readable-stream
npm http 304 https://registry.npmjs.org/optipng-bin
npm http 304 https://registry.npmjs.org/duplexer2/0.0.1
npm http 304 https://registry.npmjs.org/duplexer
npm http 304 https://registry.npmjs.org/tmp
npm http 304 https://registry.npmjs.org/inherits
npm http 304 https://registry.npmjs.org/typedarray
npm http 304 https://registry.npmjs.org/bin-wrapper
npm http 304 https://registry.npmjs.org/readable-stream
npm http 304 https://registry.npmjs.org/readable-stream
npm http GET https://registry.npmjs.org/bin-check
npm http GET https://registry.npmjs.org/download
npm http GET https://registry.npmjs.org/executable
npm http GET https://registry.npmjs.org/find-file
npm http GET https://registry.npmjs.org/progress
npm http GET https://registry.npmjs.org/rimraf
npm http GET https://registry.npmjs.org/tempfile
npm http 304 https://registry.npmjs.org/xtend
npm http GET https://registry.npmjs.org/object-keys
npm http GET https://registry.npmjs.org/string_decoder
npm http GET https://registry.npmjs.org/core-util-is
npm http GET https://registry.npmjs.org/debuglog/0.0.2
npm http 304 https://registry.npmjs.org/progress
npm http 304 https://registry.npmjs.org/rimraf
npm http 304 https://registry.npmjs.org/bin-check
npm http 304 https://registry.npmjs.org/executable
npm http 304 https://registry.npmjs.org/tempfile
npm http 304 https://registry.npmjs.org/core-util-is
npm http 304 https://registry.npmjs.org/debuglog/0.0.2
npm http 304 https://registry.npmjs.org/download
npm http 304 https://registry.npmjs.org/find-file
npm http 304 https://registry.npmjs.org/object-keys
npm http 304 https://registry.npmjs.org/string_decoder
npm http GET https://registry.npmjs.org/uuid
npm http GET https://registry.npmjs.org/decompress
npm http GET https://registry.npmjs.org/each-async
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/request
npm http 304 https://registry.npmjs.org/mkdirp
npm http 304 https://registry.npmjs.org/request
npm http 304 https://registry.npmjs.org/decompress
npm http 304 https://registry.npmjs.org/uuid
npm http 304 https://registry.npmjs.org/each-async
npm http GET https://registry.npmjs.org/adm-zip
npm http GET https://registry.npmjs.org/tar
npm http GET https://registry.npmjs.org/qs
npm http GET https://registry.npmjs.org/json-stringify-safe
npm http GET https://registry.npmjs.org/forever-agent
npm http GET https://registry.npmjs.org/node-uuid
npm http GET https://registry.npmjs.org/mime
npm http GET https://registry.npmjs.org/form-data
npm http GET https://registry.npmjs.org/tough-cookie
npm http GET https://registry.npmjs.org/tunnel-agent
npm http GET https://registry.npmjs.org/http-signature
npm http GET https://registry.npmjs.org/oauth-sign
npm http GET https://registry.npmjs.org/hawk
npm http GET https://registry.npmjs.org/aws-sign2
npm http 304 https://registry.npmjs.org/adm-zip
npm http 304 https://registry.npmjs.org/tar
npm http 304 https://registry.npmjs.org/node-uuid
npm http 304 https://registry.npmjs.org/forever-agent
npm http 304 https://registry.npmjs.org/qs
npm http 304 https://registry.npmjs.org/json-stringify-safe
npm http 304 https://registry.npmjs.org/tough-cookie
npm http 304 https://registry.npmjs.org/form-data
npm http 304 https://registry.npmjs.org/tunnel-agent
npm http 304 https://registry.npmjs.org/http-signature
npm http 304 https://registry.npmjs.org/oauth-sign
npm http 304 https://registry.npmjs.org/aws-sign2
npm http 304 https://registry.npmjs.org/hawk
npm http 304 https://registry.npmjs.org/mime
npm http GET https://registry.npmjs.org/combined-stream
npm http GET https://registry.npmjs.org/assert-plus/0.1.2
npm http GET https://registry.npmjs.org/asn1/0.1.11
npm http GET https://registry.npmjs.org/ctype/0.5.2
npm http 304 https://registry.npmjs.org/combined-stream
npm http 304 https://registry.npmjs.org/assert-plus/0.1.2
npm http 304 https://registry.npmjs.org/asn1/0.1.11
npm http 304 https://registry.npmjs.org/ctype/0.5.2
npm http GET https://registry.npmjs.org/fstream
npm http GET https://registry.npmjs.org/block-stream
npm http 304 https://registry.npmjs.org/fstream
npm http 304 https://registry.npmjs.org/block-stream
npm http GET https://registry.npmjs.org/delayed-stream/0.0.5
npm http GET https://registry.npmjs.org/punycode
npm http 304 https://registry.npmjs.org/delayed-stream/0.0.5
npm http 304 https://registry.npmjs.org/punycode
npm http GET https://registry.npmjs.org/hoek
npm http GET https://registry.npmjs.org/boom
npm http GET https://registry.npmjs.org/cryptiles
npm http GET https://registry.npmjs.org/sntp
npm http 304 https://registry.npmjs.org/boom
npm http 304 https://registry.npmjs.org/cryptiles
npm http GET https://registry.npmjs.org/graceful-fs
npm http 304 https://registry.npmjs.org/sntp
npm http 304 https://registry.npmjs.org/hoek
npm http 304 https://registry.npmjs.org/graceful-fs

> [email protected] postinstall F:\*REDACTED*\node_modules\grunt-contrib-imagemin\node_modules\image-min\node_modules\pngquant-bin
> node index.js

✗ building is not supported on win32

> [email protected] postinstall F:\*REDACTED*\node_modules\grunt-contrib-imagemin\node_modules\image-min\node_modules\jpegtran-bin
> node index.js

✗ building is not supported on win32

> [email protected] postinstall F:\*REDACTED*\node_modules\grunt-contrib-imagemin\node_modules\image-min\node_modules\gifsicle
> node index.js

✗ building is not supported on win32

> [email protected] postinstall F:\*REDACTED*\node_modules\grunt-contrib-imagemin\node_modules\image-min\node_modules\optipng-stream-bin\node_modules\optipng-bin
> node index.js

✗ building is not supported on win32
[email protected] node_modules\grunt-contrib-imagemin
├── [email protected]
├── [email protected]
├── [email protected] ([email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])

Verbose log: https://gist.github.com/simon-lifelike/f49df932bcdafa5ea952 (>11k lines...)

@vladikoff
Copy link
Member

@kevva I think we really need to remove those "building is not supported on win32" warnings, or at least say they are optional? We will be getting too many false positives. Thoughts?

@simon-lifelike
Copy link

@vladikoff tests actually fail.

grunt test --verbose
Initializing
Command-line options: --verbose

Reading "Gruntfile.js" Gruntfile...OK

Registering Gruntfile tasks.
Initializing config...OK

Registering "tasks" tasks.
Loading "imagemin.js" tasks...OK
+ imagemin

Registering "grunt-contrib-clean" local Npm module tasks.
Reading F:\Work\grunt-contrib-imagemin\node_modules\grunt-contrib-clean\package.json...OK
Parsing F:\Work\grunt-contrib-imagemin\node_modules\grunt-contrib-clean\package.json...OK
Loading "clean.js" tasks...OK
+ clean

Registering "grunt-contrib-jshint" local Npm module tasks.
Reading F:\Work\grunt-contrib-imagemin\node_modules\grunt-contrib-jshint\package.json...OK
Parsing F:\Work\grunt-contrib-imagemin\node_modules\grunt-contrib-jshint\package.json...OK
Loading "jshint.js" tasks...OK
+ jshint

Registering "grunt-contrib-nodeunit" local Npm module tasks.
Reading F:\Work\grunt-contrib-imagemin\node_modules\grunt-contrib-nodeunit\package.json...OK
Parsing F:\Work\grunt-contrib-imagemin\node_modules\grunt-contrib-nodeunit\package.json...OK
Loading "nodeunit.js" tasks...OK
+ nodeunit

Registering "grunt-contrib-internal" local Npm module tasks.
Reading F:\Work\grunt-contrib-imagemin\node_modules\grunt-contrib-internal\package.json...OK
Parsing F:\Work\grunt-contrib-imagemin\node_modules\grunt-contrib-internal\package.json...OK
Loading "build-contrib.js" tasks...OK
+ build-contrib
Loading "Gruntfile.js" tasks...OK
+ default, mkdir, test

Running tasks: test

Running "test" task

Running "clean" task

Running "clean:test" (clean) task
Verifying property clean.test exists in config...OK
Files: tmp -> test
Options: force=false, no-write=false
Options: force=false, no-write=false
Cleaning tmp...OK

Running "mkdir:tmp" (mkdir) task

Running "imagemin" task

Running "imagemin:dist" (imagemin) task
Verifying property imagemin.dist exists in config...OK
Files: test/fixtures/test.png -> tmp/test.png
Files: test/fixtures/test.jpg -> tmp/test.jpg
Files: test/fixtures/test.gif -> tmp/test.gif
Files: test/fixtures/test-uppercase.PNG -> tmp/test-uppercase.PNG
Files: test/fixtures/test-uppercase.JPG -> tmp/test-uppercase.JPG
Files: test/fixtures/test-uppercase.GIF -> tmp/test-uppercase.GIF
Options: optimizationLevel=7, progressive
Fatal error: spawn ENOENT

Using old binaries as suggested by @Yankovsky does however work.

@Yankovsky
Copy link

@vladikoff with imagemin 0.5.0 and latest version of png,jpeg,gif packages I get "TypeError: Cannot read property 'diffSizeRaw' of undefined"

@kevva
Copy link
Member

kevva commented Mar 26, 2014

@vladikoff, the building is not supported thing should not show. It something wrong with the spawning. Maybe it needs to be ran with cmd /c on Windows like we do here https://github.com/yeoman/generator/blob/master/lib/actions/spawn_command.js. Have no access to Windows so I'm unable to test.

Possible fix: https://github.com/kevva/bin-check/blob/win32/index.js#L4.

@kevva
Copy link
Member

kevva commented Mar 26, 2014

@antgonzales
Copy link

I think this issue should be re-opened. I'm having this problem on my Windows machine 32x.

Here is what I did:

Still getting error message "Warning: Cannot call method 'replace' of undefined Use".

@dbxt
Copy link

dbxt commented Apr 5, 2014

I've run into the same issues on Linux Mint 64bit. Following the steps in @antgonzales post is the only way it's worked consistently.

@faisalferoz
Copy link

I had the same issue on ubuntu 12.04 32-bit/64-bit. Following the steps in @antgonzales post works consistently.

@nareshbhatia
Copy link

I am able to reproduce the issue reported by @antgonzales by following the steps he has listed. I am on a Windows 7 64bit machine. Can someone please reopen this issue? It is real!

As a workaround, I am using grunt --force. When done, I have to manually copy my images folder to the dist folder.

@curtbrown
Copy link

I was also seeing, "Warning: Cannot call method 'replace' of undefined". Using the workaround described by @abiyasa resolved the issue for me.

Windows 7 Enterprise x64
Node 0.10.26
Grunt 0.4.4

@nareshbhatia
Copy link

@abiyasa's workaround is not working for me. I get:

Warning: Running "imagemin:dist" (imagemin) task
Warning: Cannot call method 'replace' of undefined Use --force to continue.

@fredericgrati
Copy link

I have the same issue on Window.
"Warning: Cannot call method 'replace' of undefined Use --force to continue."

Is it possible to reopen this issue ?

@vladikoff vladikoff reopened this May 9, 2014
@tcditgens
Copy link

I do have the same message: "Warning: Cannot call method 'replace' of undefined"

+1

@newtonianb
Copy link

Same problem here "Warning: Cannot call method 'replace' of undefined" on Windows 8.
The culprit seems to be PNG files

@nareshbhatia
Copy link

This is now fixed by bumping up the version of imagemin to 0.7 (see yeoman/generator-webapp#371). As far as I can tell, this issue can be closed.

@kevva kevva closed this as completed Oct 23, 2014
@davewallace
Copy link

davewallace commented Jun 23, 2016

Experiencing what appears to be the same issue on WIndows 10 on one machine, but not another, where both machines have had mostly identical setups; nvm, a handful of global installed packages like grunt-cli and jshint. I checked the working npm install (https://github.com/tastejs/todomvc/ clone) and the package.json contains: "gulp-imagemin": "1.0.0",.

In this gist you can see the console output for the failed Windows 10 npm install: https://gist.github.com/davewallace/3bef739c5a4957b087db28a0c3bd00b4

When I search for imagemin in that output, I see different version numbers for things, not sure if that relates to some comments above about increasing version numbers:

On both Windows 10 boxes I have cloned and run npm install on the same todomvc repo mentioned above.

@davewallace
Copy link

davewallace commented Jun 26, 2016

@kevva In a reduced test case, I just ran npm install [email protected], npm install [email protected] , npm install [email protected] and npm install [email protected] (with elevated privileges) in an empty directory, and all of them generated the same flavour of error:

> node index.js

path.js:7
    throw new TypeError('Path must be a string. Received ' + inspect(path));
    ^

TypeError: Path must be a string. Received { url: 'https://raw.github.com/imagemin/optipng-bin/v0.3.11/vendor/win/optipng.exe',
  name: 'optipng.exe',
  os: 'win32' }
    at assertPath (path.js:7:11)
    at Object.basename (path.js:801:5)
    at C:\wamp\www\codefinger-projects\prototypes\test\node_modules\download\index.js:35:43
    at each (C:\wamp\www\codefinger-projects\prototypes\test\node_modules\each-async\each-async.js:63:4)
    at module.exports (C:\wamp\www\codefinger-projects\prototypes\test\node_modules\download\index.js:33:5)
    at C:\wamp\www\codefinger-projects\prototypes\test\node_modules\bin-wrapper\index.js:108:20
    at C:\wamp\www\codefinger-projects\prototypes\test\node_modules\bin-wrapper\index.js:141:24
    at C:\wamp\www\codefinger-projects\prototypes\test\node_modules\bin-check\index.js:30:20
    at C:\wamp\www\codefinger-projects\prototypes\test\node_modules\executable\index.js:39:20
    at FSReqWrap.oncomplete (fs.js:117:15)

This issue is definitely still alive and rebelling.

@hem-kant
Copy link

hem-kant commented Jul 24, 2017

@davewallace ,Yes this isse is still alive ,Any suggestion most welcome
image

@jorrit
Copy link

jorrit commented Jul 24, 2017

Why aren't you running npm install grunt-contrib-imagemin?

@hem-kant
Copy link

@jorrit npm install [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests