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

Silent fail on postInstall #29

Closed
ki7 opened this issue Apr 16, 2015 · 26 comments
Closed

Silent fail on postInstall #29

ki7 opened this issue Apr 16, 2015 · 26 comments
Labels

Comments

@ki7
Copy link

ki7 commented Apr 16, 2015

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

> [email protected] 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')"

d1b2d11#commitcomment-10753523

@MoOx
Copy link
Collaborator

MoOx commented Apr 16, 2015

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

@ooflorent
Copy link
Contributor

Please also provide your npm version!

@ki7
Copy link
Author

ki7 commented Apr 16, 2015

node -v
v0.10.26

npm -v
1.4.3

@ooflorent
Copy link
Contributor

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
Copy link
Author

ki7 commented Apr 17, 2015

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

@ooflorent
Copy link
Contributor

Anything else that delete the directory is ok.

Le vendredi 17 avril 2015, ki7 [email protected] a écrit :

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


Reply to this email directly or view it on GitHub
#29 (comment).

Florent Cailhol

@ki7
Copy link
Author

ki7 commented Apr 17, 2015

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

> [email protected] 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
Copy link
Author

ki7 commented Apr 17, 2015

Upgraded
Node 10.32
Npm 2.7.6

Le jeudi 16 avril 2015, Maxime Thirouin [email protected] 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
#29 (comment).

@MoOx
Copy link
Collaborator

MoOx commented Apr 17, 2015

So does this fix anyting ?

@ki7
Copy link
Author

ki7 commented Apr 17, 2015

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
Copy link
Collaborator

MoOx commented Apr 17, 2015

Can you clone this repo and run the tests ?

@ki7
Copy link
Author

ki7 commented Apr 17, 2015

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

and the test passes...

@ki7
Copy link
Author

ki7 commented Apr 17, 2015

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

@MoOx
Copy link
Collaborator

MoOx commented Apr 17, 2015

the thing is, there is a test to know if we are in dev or in non dev if(test('-d', 'dist'))

"postinstall": "node -e \"require('shelljs/global');if(test('-d', 'dist'))exec('node dist/generate-features.js')\""

maybe that's the problem

@MoOx
Copy link
Collaborator

MoOx commented Apr 28, 2015

MoOx added a commit to putaindecode/putaindecode.io that referenced this issue Apr 28, 2015
@MoOx
Copy link
Collaborator

MoOx commented Apr 28, 2015

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
Copy link
Collaborator

MoOx commented Apr 28, 2015

@MoOx
Copy link
Collaborator

MoOx commented Apr 28, 2015

@MoOx
Copy link
Collaborator

MoOx commented Apr 28, 2015

Not sure if this module is responsible.

@mark-adams
Copy link

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.

...
build   24-Apr-2015 15:49:46    �[0m�[91mnpm info build /app/node_modules/babel-core/node_modules/regenerator
build   24-Apr-2015 15:49:46    �[0m�[91mnpm info linkStuff [email protected]
build   24-Apr-2015 15:49:46    �[0m�[91mnpm info install [email protected]
build   24-Apr-2015 15:49:46    �[0m�[91mnpm info postinstall [email protected]
build   24-Apr-2015 15:49:46    �[0m�[91mnpm info preinstall [email protected]
build   24-Apr-2015 15:49:46    �[0m�[91mnpm info build /app/node_modules/caniuse-api/node_modules/caniuse-db
build   24-Apr-2015 15:49:46    �[0m�[91mnpm info linkStuff [email protected]
build   24-Apr-2015 15:49:46    �[0m�[91mnpm info install [email protected]
build   24-Apr-2015 15:49:46    �[0m�[91mnpm info postinstall [email protected]
build   24-Apr-2015 15:49:46    �[0m�[91mnpm info build /app/node_modules/caniuse-api
build   24-Apr-2015 15:49:46    �[0m�[91mnpm info linkStuff [email protected]
build   24-Apr-2015 15:49:46    �[0m�[91mnpm info install [email protected]
build   24-Apr-2015 15:49:46    �[0m�[91mnpm info postinstall [email protected]
build   24-Apr-2015 15:49:46    �[0m
build   24-Apr-2015 15:49:46    > [email protected] 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
Copy link
Collaborator

MoOx commented May 1, 2015

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

@MoOx
Copy link
Collaborator

MoOx commented May 12, 2015

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

@MoOx
Copy link
Collaborator

MoOx commented Apr 4, 2016

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

@MoOx MoOx closed this as completed Apr 4, 2016
@elliotdickison
Copy link

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 [email protected] and [email protected]. Any thoughts?

$ npm install

> [email protected] postinstall /home/gitlab-runner/builds/94361d8d/0/app/node_modules/caniuse-api
> node generator.js

ERROR: Build failed with: exit status 1

@MoOx
Copy link
Collaborator

MoOx commented May 11, 2016

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

@MoOx MoOx reopened this May 11, 2016
@MoOx MoOx added the bug label May 11, 2016
@MoOx
Copy link
Collaborator

MoOx commented Sep 5, 2016

Closed by #47

@MoOx MoOx closed this as completed Sep 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants