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

core dump when installing with Node.js 12 #479

Closed
piranna opened this issue Apr 24, 2019 · 17 comments
Closed

core dump when installing with Node.js 12 #479

piranna opened this issue Apr 24, 2019 · 17 comments

Comments

@piranna
Copy link

piranna commented Apr 24, 2019

I updated yesterday to Node.js 12, and today after removing node_modules folder and making npm install, husky is throwing core dumps when installing the hooks:

> husky@1.3.1 install /home/piranna/Trabajo/lingbe/client-core/node_modules/husky
> node husky install

husky > setting up git hooks


#
# Fatal error in , line 0
# Check failed: U_SUCCESS(status).
#
#
#
#FailureMessage Object: 0x7ffe72d576f0Illegal instruction (core dumped)

npm ERR! code ELIFECYCLE
npm ERR! errno 132
npm ERR! husky@1.3.1 install: `node husky install`
npm ERR! Exit status 132
npm ERR! 
npm ERR! Failed at the husky@1.3.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

The npm debug log has only the next references:

30754 silly install husky@1.3.1
30755 info lifecycle husky@1.3.1~install: husky@1.3.1
30756 verbose lifecycle husky@1.3.1~install: unsafe-perm in lifecycle true
30757 verbose lifecycle husky@1.3.1~install: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/piranna/Trabajo/lingbe/client-core/node_modules/husky/node_modules/.bin:/home/piranna/Trabajo/lingbe/client-core/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/piranna/Android/Sdk/emulator:/home/piranna/Android/Sdk/tools:/home/piranna/Android/Sdk/tools/bin:/home/piranna/Android/Sdk/platform-tools:/home/piranna/Trabajo/Ventrata/depot_tools
30758 verbose lifecycle husky@1.3.1~install: CWD: /home/piranna/Trabajo/lingbe/client-core/node_modules/husky
30759 silly lifecycle husky@1.3.1~install: Args: [ '-c', 'node husky install' ]
30760 silly lifecycle husky@1.3.1~install: Returned: code: 132  signal: null
30761 info lifecycle husky@1.3.1~install: Failed to exec install script
@typicode
Copy link
Owner

Hi @piranna,

Hmm I can't seem to reproduce. Do you also get the error with a new project:

mkdir test
cd test
npm init -y
git init
npm install husky -D

@piranna
Copy link
Author

piranna commented Apr 24, 2019

I didn't try with a new project, but going back to Node.js v11.14.0 is working again. I opened an issue on Node.js repo at nodejs/node#27385 and seems it could be related with nodejs/node#27379.

@fraxken
Copy link

fraxken commented Apr 24, 2019

Same problem here with Node.js v12.0.0 (On Windows 10).

1 similar comment
@THernandez03
Copy link

Same problem here with Node.js v12.0.0 (On Windows 10).

@bigslycat
Copy link

Same problem here with Node.js v12.0.0 (On Ubuntu 19.04)

@wontoncc
Copy link

Same problem here with Node.js v12.0.0 (On Windows 10).

@THernandez03
Copy link

Hi @piranna,

Hmm I can't seem to reproduce. Do you also get the error with a new project:

mkdir test
cd test
npm init -y
git init
npm install husky -D

Can't reproduce using this steps 🤔, everything was ok.

Maybe a dependency of the project is causing a conflict, i will continue checking what is the problem.

@Svish
Copy link

Svish commented Apr 26, 2019

Same error here, on Windows 10.

  • Pretty fresh project created today.
  • npm install husky fails on Node.js v12.0.0, but does seem to work when reverting back to Node.js v11.14.0
  • After successfully installing using v11, and then reverting back to v12, the pre-commit hook I added does seem to trigger and work fine though...

So... I'm guess there's an incompatibility between Node.js v12 and the husky package installation process or something?

Full debug log:

Output from console:

Y:\projects\foobar> npm install husky

> husky@2.1.0 install Y:\projects\foobar\node_modules\husky
> node husky install

husky > setting up git hooks


#
# Fatal error in , line 0
# Check failed: U_SUCCESS(status).
#
#
#
#FailureMessage Object: 000000C05AFBD4F0npm ERR! code ELIFECYCLE

@kingfree
Copy link

Same error on Windows 10, Node v12.0.0

[4/4] Building fresh packages...
[1/2] ⠠ husky
error C:\Users\***\node_modules\husky: Command failed.
Exit code: 3221225477
Command: node husky install
Arguments:
Directory: C:\Users\***\node_modules\husky
Output:
husky > setting up git hooks


#
# Fatal error in , line 0
# Check failed: U_SUCCESS(status).
#
#
#
#FailureMessage Object: 000000BE02D1D660

@piranna
Copy link
Author

piranna commented Apr 26, 2019

The problem is in the Node.js side, it's related to a bug in the ICU internationalization database used by v8 (three levels of indirection!!!). The only solution we could do here is to remove any magic related to default locale like usage of Date.toLocaleString() in the install script if we are using it. Anyway, we hope it gets fixed soon there...

@piranna
Copy link
Author

piranna commented Apr 26, 2019

More info at nodejs/node#27379, seems to be a somewhat important bug, there's a lot of people with problems due to it.

@bnoordhuis
Copy link

The crash will be fixed in the next Node.js v12.x release. This issue can be closed.

@piranna
Copy link
Author

piranna commented Apr 28, 2019

Let's wait until we confirm that it gets fixed.

@DRoet
Copy link

DRoet commented Apr 30, 2019

FYI 12.1.0 is out now

@piranna
Copy link
Author

piranna commented Apr 30, 2019

I had pending to write it here, I have checked it and seems to work with Node.js 12.1.0, seems the bug is fixed.

@typicode
Copy link
Owner

typicode commented May 1, 2019

Thanks for the update @piranna, I'm closing this issue then :)

@typicode typicode closed this as completed May 1, 2019
@piranna
Copy link
Author

piranna commented May 1, 2019

Thanks for the update @piranna, I'm closing this issue then :)

You are welcome :-)

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

10 participants