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

Since v0.2.1: "building is not supported on win32" #37

Closed
Guuz opened this issue Nov 6, 2013 · 33 comments

Comments

Projects
None yet
@Guuz
Copy link

commented Nov 6, 2013

No problems in v0.2.0 but when npm installing v0.2.1 I get an error:
(Windows 8.1, 64bit, and CI servers)


  libjpeg-62.dll: downloading [====               ] 23% 0.5s✗ pre-build test fai
led, compiling from source...

C:\Projects\Rijksmuseum.PaintSampleApp\src\client\node_modules\grunt-contrib-ima
gemin\node_modules\jpegtran-bin\lib\check.js:19
                        throw new Error('building is not supported on ' + proces
s.platform);
                              ^
Error: building is not supported on win32
    at C:\Projects\Rijksmuseum.PaintSampleApp\src\client\node_modules\grunt-cont
rib-imagemin\node_modules\jpegtran-bin\lib\check.js:19:10
    at ChildProcess.<anonymous> (C:\Projects\Rijksmuseum.PaintSampleApp\src\clie
nt\node_modules\grunt-contrib-imagemin\node_modules\jpegtran-bin\node_modules\bi
n-wrapper\bin-wrapper.js:168:16)
    at ChildProcess.EventEmitter.emit (events.js:95:17)
    at Process.ChildProcess._handle.onexit (child_process.js:787:12)
npm ERR! error rolling back Error: ENOTEMPTY, rmdir 'C:\Projects\Rijksmuseum.Pai
ntSampleApp\src\client\node_modules\grunt-contrib-imagemin\node_modules\optipng-
bin\node_modules\bin-wrapper\node_modules\mout\src\lang'
npm ERR! error rolling back  grunt-contrib-imagemin@0.3.0 { [Error: ENOTEMPTY, r
mdir 'C:\Projects\Rijksmuseum.PaintSampleApp\src\client\node_modules\grunt-contr
ib-imagemin\node_modules\optipng-bin\node_modules\bin-wrapper\node_modules\mout\
src\lang']
npm ERR! error rolling back   errno: 53,
npm ERR! error rolling back   code: 'ENOTEMPTY',
npm ERR! error rolling back   path: 'C:\\Projects\\Rijksmuseum.PaintSampleApp\\s
rc\\client\\node_modules\\grunt-contrib-imagemin\\node_modules\\optipng-bin\\nod
e_modules\\bin-wrapper\\node_modules\\mout\\src\\lang' }
npm ERR! weird error 8
npm ERR! Error: ENOENT, lstat 'C:\Projects\Rijksmuseum.PaintSampleApp\src\client
\node_modules\grunt-contrib-imagemin\node_modules\optipng-bin\node_modules\bin-w
rapper\node_modules\mout\src\lang\createObject.js'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Windows_NT 6.2.9200
npm ERR! command "c:\\Program Files\\nodejs\\node.exe" "c:\\Program Files\\nodej
s\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! cwd C:\Projects\Rijksmuseum.PaintSampleApp\src\client
npm ERR! node -v v0.10.20
npm ERR! npm -v 1.3.11
npm ERR! path C:\Projects\Rijksmuseum.PaintSampleApp\src\client\node_modules\gru
nt-contrib-imagemin\node_modules\optipng-bin\node_modules\bin-wrapper\node_modul
es\mout\src\lang\createObject.js
npm ERR! fstream_path C:\Projects\Rijksmuseum.PaintSampleApp\src\client\node_mod
ules\grunt-contrib-imagemin\node_modules\optipng-bin\node_modules\bin-wrapper\no
de_modules\mout\src\lang\createObject.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack c:\Program Files\nodejs\node_modules\npm\node_modules\fst
ream\lib\writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Projects\Rijksmuseum.PaintSampleApp\src\client\npm-debug.log
npm ERR! not ok code 0
@youcandanch

This comment has been minimized.

Copy link
Contributor

commented Nov 6, 2013

@rbg246

This comment has been minimized.

Copy link

commented Nov 8, 2013

I'm getting the same issue but not sure where to find the above mentioned file. Is this a file that's downloaded when I install a new web app?

@camilolopes

This comment has been minimized.

Copy link

commented Nov 8, 2013

good question @rbg246 , I am having the same problem

@ejwaibel

This comment has been minimized.

Copy link

commented Nov 10, 2013

I just ran into this issue today, very annoying as I cannot setup any projects.

@zannr1

This comment has been minimized.

Copy link

commented Nov 10, 2013

ok so does anyone know how to handle this "building is not supported on win32" problem yet? i just got the same thing. ahhhhhhhhhhh!

@camilolopes

This comment has been minimized.

Copy link

commented Nov 10, 2013

it is a big problem I gave up to use yeoman because of this problem, I spent hours looking for solution on the internet, but nothing in respect. =/

@SBoudrias

This comment has been minimized.

Copy link
Contributor

commented Nov 10, 2013

I gave up to use yeoman because of this problem

The solution for Windows user would be to remove the grunt task using jpegtrang in your project (Gruntfile.js and package.json files). Then the rest would've work as expected.

This is sure less than ideal, but sometime stuff broke and while someone works on a fix, you need to work around.

@camilolopes

This comment has been minimized.

Copy link

commented Nov 10, 2013

alright, I will try this work around. thanks @SBoudrias

@badunk

This comment has been minimized.

Copy link
Contributor

commented Nov 10, 2013

@camilolopes Try to reference an older version as well. In particular, @Guuz referenced this: gruntjs/grunt-contrib-imagemin#108

@youcandanch

This comment has been minimized.

Copy link
Contributor

commented Nov 10, 2013

The pull request to fix this has been up at #38 for awhile now. Not sure what the hold up is. I tried that locally and it seems to be just fine.

@jdhoek

This comment has been minimized.

Copy link

commented Nov 12, 2013

I ran into this trying to get the Yeoman ember-generator working with a call to yo ember. Is there a workaround in this case? If I understand correctly I should set some packages' JPEGtran dependency to jpegtran-bin": "0.2.0", but which package?

@badunk

This comment has been minimized.

Copy link
Contributor

commented Nov 12, 2013

@jdhoek I believe your project may have a dependency on grunt-contrib-imagemin which in turn has a dependency on jpegtran-bin.

You may have to downgrade the dependency on grunt-contrib-imagemin then, as well or test it with a git clone and npm link :/

@rbg246

This comment has been minimized.

Copy link

commented Nov 12, 2013

@badunk What I have done is as follows:

I've install yeoman, installed generator-webapp then gone to install yo webapp and get above mentioned error.

I've then gone to the directory where I've installed webapp and gone into node_modules\grunt-contrib-imagemin and changed the package.json to 0.20 instead of ~0.020. I now get an error Phantom installation failed Invalid or unsupported zip format. No END header found undefined which was the file being downloaded before the jpegtran.

Is this connected or have I made further errors?

Thanks

@badunk

This comment has been minimized.

Copy link
Contributor

commented Nov 12, 2013

So I did a quick check on grunt-contrib-imagemin for its dependency on jpegtran-bin. I would do the following:

  1. yo webapp
  2. let the auto installation fail/error out
  3. npm install grunt-contrib-imagemin@0.2.1 --save-dev
  4. npm install again to make sure all the other packages are OK

By step 3, you should be able to tell if that binary works for you already since it does some prebuild test.

That should get it to work if the problem is with jpegtran-bin's windows binary. I haven't tested, but let me know if that works for you.

@rbg246

This comment has been minimized.

Copy link

commented Nov 12, 2013

Thanks for the help. will have a look in morning. Will let you know.

@zannr1

This comment has been minimized.

Copy link

commented Nov 12, 2013

lol i just dual booted my win8 machine and added ubuntu... thats really the
solution, every thing works great now.

On Tue, Nov 12, 2013 at 6:06 PM, Richard Gaunt notifications@github.comwrote:

Thanks for the help. will have a look in morning. Will let you know.


Reply to this email directly or view it on GitHubhttps://github.com//issues/37#issuecomment-28343175
.

@paulnijssen

This comment has been minimized.

Copy link

commented Nov 13, 2013

I tried the 4 step solution @badunk but i still keep getting a error.

All so changed "jpegtran-bin": "~0.2.0" to "jpegtran-bin": "0.2.0" in grunt-contrib-imagemin package.json

1st,

c:\FILES\Projects\node\ember-test\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:\FILES\Projects\node\ember-test\node_modules\grunt-contrib-imagemin\node_modules\jpegtran-bin\lib\check.js:19:10
at ChildProcess. (c:\FILES\Projects\node\ember-test\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)
pngquant.exe: downloading [===================] 100% 0.0s


2nd

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:\FILES\Projects\node\ember-test\node_modules\grunt-contrib-imagemin\node_modules\gifsicle\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! error rolling back Error: EPERM, rmdir 'c:\FILES\Projects\node\ember-test\node_modules\grunt-contrib-imagemin\node_modules\gifsicle\node_modules\bin-wrapper\node_modules\download'
npm ERR! error rolling back grunt-contrib-imagemin@0.2.1 { [Error: EPERM, rmdir 'c:\FILES\Projects\node\ember-test\node_modules\grunt-contrib-imagemin\node_modules\gifsicle\node_modules\bin-wrapp
er\node_modules\download']
npm ERR! error rolling back errno: 50,
npm ERR! error rolling back code: 'EPERM',
npm ERR! error rolling back path: 'c:\FILES\Projects\node\ember-test\node_modules\grunt-contrib-imagemin\node_modules\gifsicle\node_modules\bin-wrapper\node_modules\download' }
npm ERR! weird error 8
npm ERR! not ok code 0

@rbg246

This comment has been minimized.

Copy link

commented Nov 13, 2013

@badunk Thanks for the help your instructions worked with the change of one thing. Here is what worked for me.

  1. yo webapp
    let the auto installation fail/error out
  2. npm install grunt-contrib-imagemin@0.2.0 --save-dev
  3. npm install again to make sure all the other packages are OK

The difference being the version of grunt-contrib-imagemin being installed.

@badunk

This comment has been minimized.

Copy link
Contributor

commented Nov 13, 2013

@rbg246 oops, glad it worked for you

@paulnijssen

This comment has been minimized.

Copy link

commented Nov 13, 2013

@rbg246 works, thanks

@jmrossy

This comment has been minimized.

Copy link

commented Nov 15, 2013

I had the same problem running on an Ubuntu 13 VM, this seems to have fixed it! Thanks!

@activelogic

This comment has been minimized.

Copy link

commented Nov 15, 2013

Just to confirm, I've followed the steps as described by rbg246. When i re-run npm install at the command prompt in the root folder of my app I don't get any messages except for the following warnings:

npm WARN package.json angularapp@0.0.0 No description
npm WARN package.json angularapp@0.0.0 No repository field.
npm WARN package.json angularapp@0.0.0 No README data

Does this mean everything worked?

Also given that grunt-contrib-imagemin@0.2.0 installs properly, is there a way to edit the generator-angular scripts to use this instead? I've tried changing it under generator-angular/templates/common/_package.json (from ~0.3.0 to ~0.2.0), but that didn't help.

Note, I'm running generator-angular as 'yo angular'.

@badunk

This comment has been minimized.

Copy link
Contributor

commented Nov 15, 2013

@MeAndNotYou that should mean it worked

During npm install, there is a step where it goes through 3 or 4 tests, first for pngs then for jpegs.

These tests check whether the binaries that were fetched are compatiblity with your system and whether further action is necessary. If it says "all tests passed", then it should be good.

@activelogic

This comment has been minimized.

Copy link

commented Nov 15, 2013

@badunk I'm not getting any output except for the warning messages. It doesn't go through the tests and show the result as it does when initially running yo angular.

@badunk

This comment has been minimized.

Copy link
Contributor

commented Nov 15, 2013

hm, then I take it back...seems broken

@activelogic

This comment has been minimized.

Copy link

commented Nov 15, 2013

Ok, I got it all to work running just yo angular by changing:

"grunt-contrib-imagemin": "~0.3.0" to specifically use 0.2.0... so:

"grunt-contrib-imagemin": "0.2.0"

This was done in: \generator-angular/templates/common/_package.json

No errors were outputted during the initial run and all tests passed successfully.

@badunk

This comment has been minimized.

Copy link
Contributor

commented Nov 15, 2013

yes, I think something is very weird

I'm on OSX and I can reproduce your initial problem. I had to remove imagemin from node_modules and reinstall it with 0.2.0 to get it to work.

Otherwise, on step 2 of the install - the build sorta hangs. Anyways,unrelated to this issue at hand here with windows

@Guuz

This comment has been minimized.

Copy link
Author

commented Nov 27, 2013

This issue got closed but it hasnt been fixed yet. Only workarounds have been suggested.

@youcandanch

This comment has been minimized.

Copy link
Contributor

commented Nov 27, 2013

It's merged in, but the version of the package wasn't bumped, so NPM's still grabbing the old one.

@briankostar

This comment has been minimized.

Copy link

commented Mar 21, 2014

Another person having this issue.. I tried @badunk 's fix, but I'm still getting the "building is not supported on win32" error. Can we re-open this thread?

@kevva

This comment has been minimized.

Copy link
Member

commented Mar 21, 2014

@briankostar, which version?

@keberox

This comment has been minimized.

Copy link

commented Mar 25, 2014

@kevva I got that error just today, version 0.5.0

@nickeblewis

This comment has been minimized.

Copy link

commented Mar 25, 2014

I've decided to eliminate both "grunt-contrib-imagemin" and "grunt-google-cdn" from my project, since neither of them work. Seems like the best policy for the time being.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.