Modernizr/gulp-modernizr

Install failing

sQVe opened this issue · 11 comments

sQVe commented

I'm trying to install this package the following way:

npm install --save-dev git://github.com/doctyper/gulp-modernizr.git

Also by just cloning the rep and then running npm install in it.

Both ways give me this error:

> customizr@0.0.0 postinstall c:\Users\grunningO\Desktop\ghost\content\themes\laban\node_moules\customizr
> if [[ -d node_modules/modernizr ]]; then ( cd node_modules/modernizr; npm install --prodution; cd -; ); fi

Oväntat -d.

npm ERR! customizr@0.0.0 postinstall: `if [[ -d node_modules/modernizr ]]; then ( cd node_mdules/modernizr; npm install --production; cd -; ); fi`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the customizr@0.0.0 postinstall script.

I'm on Windows, if that makes any difference.

Would love some help or insight on how I could resolve this error, would really love to use your awesome customizr.

Might be a case of the Windows environment not able to execute bash commands. I'm not currently able to test this unfortunately, but maybe you could run that command in your shell from your project root and paste the output here.

Is this bash command necessary? Why do we have to run npm install again for this dependency?

A solution would be to use a postinstall.js which runs on all platforms, same for npm test:
backflip/customizr@07a0daa

@doctyper Would you consider a pull-request containing above changes?

Can you make a pull request @backflip? This seems like good, but I prefer keep the main repo as target.

+1 for this 👍

have same issue.
System Windows_NT 6.1.7601
node 0.10.31
npm 1.4.23

I've make Pull Request directly from the @backflip code here : Modernizr/customizr#4

Sorry for the delay, @Alex-D.

IMHO, my fork isn't really ready for merging:

  1. It uses a fork of Modernizr (see Modernizr/Modernizr#1380)
  2. I'm not sure whether test.js really works (I might have just created it to the point where it didn't throw an error anymore).

I've just pushed an updated build to the develop branch. It moves the inline shell code to a (hopefully) cross-OS-friendly node script. To update:

$ npm uninstall gulp-modernizr
$ npm cache clear
$ npm install --save-dev "gulp-modernizr@https://github.com/doctyper/gulp-modernizr/tarball/develop"

Let me know if this alleviates the errors.

/ht @backflip

Thanks a lot! As mentioned in #14 (comment) there is still an issue with spawn on Windows, but Modernizr/customizr#5 should resolve it.