Nyalab / caniuse-api

request the caniuse data to check browsers compatibilities
MIT License
356 stars 27 forks source link

Silent fail on postInstall #29

Closed ki7 closed 8 years ago

ki7 commented 9 years ago

The postInstall scripts seems to never be executed. it fails leaving stderout with

> caniuse-api@1.3.1 postinstall d:\E-Ressources\WebApps\www\node_modul
es\gulp-cssnext\node_modules\cssnext\node_modules\caniuse-api
> node -e "require('shelljs/global');if(test('-d', 'dist'))exec('node
dist/generate-features.js')"

https://github.com/Nyalab/caniuse-api/commit/d1b2d11e37a4738221349034cbefee640b081212#commitcomment-10753523

MoOx commented 9 years ago

what is your version of nodejs please ? Maybe we should add a test on appveyor about this hook.

ooflorent commented 9 years ago

Please also provide your npm version!

ki7 commented 9 years ago

node -v v0.10.26

npm -v 1.4.3

ooflorent commented 9 years ago

Can you try the following commands?

npm i -g npm@latest
rd /s /q node_modules
npm -v
npm i 

It should update npm and try to reinstall the dependencies.

ki7 commented 9 years ago

Can't play the rd command, (command not found).

ooflorent commented 9 years ago

Anything else that delete the directory is ok.

Le vendredi 17 avril 2015, ki7 notifications@github.com a écrit :

Can't play the rd command, (command not found).

— Reply to this email directly or view it on GitHub https://github.com/Nyalab/caniuse-api/issues/29#issuecomment-93940096.

Florent Cailhol

ki7 commented 9 years ago

Well Still. Except this time the bash won't exit and get blocked on:

> caniuse-api@1.3.1 postinstall d:\app\node_modul
es\gulp-cssnext\node_modules\cssnext\node_modules\caniuse-api
> node -e "require('shelljs/global');if(test('-d', 'dist'))exec('node
dist/generate-features.js')"
ki7 commented 9 years ago

Upgraded Node 10.32 Npm 2.7.6

Le jeudi 16 avril 2015, Maxime Thirouin notifications@github.com a écrit :

what is your version of nodejs please ? Maybe we should add a test on appveyor about this hook.

— Reply to this email directly or view it on GitHub https://github.com/Nyalab/caniuse-api/issues/29#issuecomment-93718721.

MoOx commented 9 years ago

So does this fix anyting ?

ki7 commented 9 years ago

Absolutely not /o. I'll fallback to postcss instead of cssnext for now.

I'm still looking for the why a postinstall scripts is not executed in the meantime. If you have any leads (test cases), or anything i can do, i'll be happy to help

MoOx commented 9 years ago

Can you clone this repo and run the tests ?

ki7 commented 9 years ago

:$ Should have been my first move. Didn't run the test but the install goes smoothly...

and the test passes...

ki7 commented 9 years ago

Well, this more a gulp-cssnext issue? (cloning gulp-cssnext repo give me the same error)

MoOx commented 9 years ago

the thing is, there is a test to know if we are in dev or in non dev if(test('-d', 'dist')) https://github.com/Nyalab/caniuse-api/blob/f7f552dd7f62d4d0163093660d7de588ec47a0e8/package.json#L30 maybe that's the problem

MoOx commented 9 years ago

I got a similar issue https://travis-ci.org/putaindecode/putaindecode.fr/builds/60327539

MoOx commented 9 years ago

I were having issues ("blocked" install - see build lined above) so I tried to make a more node friendly approch (without eval) in the better-postinstall branch. I used it to "fix" the build (not sure what it might change...) It's a bit verbose but if we got trouble again, we will be able to "dichotomize" the problem :D https://travis-ci.org/putaindecode/putaindecode.fr/builds/60331275#L122-L127

We will see on this project if the issue happen again and we might eventually merge the changes of the branch (not the branch directly since I got to add dist/ in git to get npm install working from git repo) if no problems came up.

So wait and see.

MoOx commented 9 years ago

Also https://gist.github.com/ooflorent/cbc1c1445f00ec999341

MoOx commented 9 years ago

Well well wel... https://travis-ci.org/putaindecode/putaindecode.fr/builds/60335395

MoOx commented 9 years ago

Not sure if this module is responsible.

mark-adams commented 9 years ago

We're experiencing the same issue with a build in our CI system (Bamboo). It reaches the post-install and then hangs. It seems to happen sporadically and only happens in CI. I haven't seen it happen locally yet.

Logs are below.

npm@2.7.4
node@v1.6.3
...
build   24-Apr-2015 15:49:46    npm info build /app/node_modules/babel-core/node_modules/regenerator
build   24-Apr-2015 15:49:46    npm info linkStuff regenerator@0.8.22
build   24-Apr-2015 15:49:46    npm info install regenerator@0.8.22
build   24-Apr-2015 15:49:46    npm info postinstall regenerator@0.8.22
build   24-Apr-2015 15:49:46    npm info preinstall caniuse-db@1.0.30000141
build   24-Apr-2015 15:49:46    npm info build /app/node_modules/caniuse-api/node_modules/caniuse-db
build   24-Apr-2015 15:49:46    npm info linkStuff caniuse-db@1.0.30000141
build   24-Apr-2015 15:49:46    npm info install caniuse-db@1.0.30000141
build   24-Apr-2015 15:49:46    npm info postinstall caniuse-db@1.0.30000141
build   24-Apr-2015 15:49:46    npm info build /app/node_modules/caniuse-api
build   24-Apr-2015 15:49:46    npm info linkStuff caniuse-api@1.3.1
build   24-Apr-2015 15:49:46    npm info install caniuse-api@1.3.1
build   24-Apr-2015 15:49:46    npm info postinstall caniuse-api@1.3.1
build   24-Apr-2015 15:49:46    
build   24-Apr-2015 15:49:46    > caniuse-api@1.3.1 postinstall /app/node_modules/caniuse-api
build   24-Apr-2015 15:49:46    > node -e "require('shelljs/global');if(test('-d', 'dist'))exec('node dist/generate-features.js')"
build   24-Apr-2015 15:49:46    
simple  24-Apr-2015 16:09:48     _   _  ____  _  _
simple  24-Apr-2015 16:09:48    ( )_( )(  _ \( )/ )
simple  24-Apr-2015 16:09:48     ) _ (  ) _ < )  ( 
simple  24-Apr-2015 16:09:48    (_) (_)(____/(_)\_) 
simple  24-Apr-2015 16:09:48    This build has been killed by the HBK (Hung Build Killer). Either Bamboo has detected the build has hung or it has been manually stopped.
MoOx commented 9 years ago

I 've activated --loglevel=info for npm install on several place, hopes that helps to find what is happening :/

MoOx commented 9 years ago

@mark-adams do you still get the issue recently ?

MoOx commented 8 years ago

Closing has nobody complained about this. Maybe track #32.

elliotdickison commented 8 years ago

I just started running into this issue... my CI server consistently fails silently when installing this package (as an indirect dep of postcss-cssnext). I'm using npm@3.7.3 and node@5.9.0. Any thoughts?

$ npm install

> caniuse-api@1.4.1 postinstall /home/gitlab-runner/builds/94361d8d/0/app/node_modules/caniuse-api
> node generator.js

ERROR: Build failed with: exit status 1
MoOx commented 8 years ago

No clue. I think it's time to remove the generation step.

MoOx commented 8 years ago

Closed by #47