-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
[0.17] Regression: Native modules (node-gyp) not built correctly after using "yarn add" #1848
Comments
Can't reproduce it in master
@gitawego, is it fixed now? |
I got similar on Yarn 0.17.0 installing
|
I am getting the same with Yarn 0.17.2, had to run
|
@bestander it's worth noting that this error only occurs at runtime, not at yarn install time. The yarn install works fine, just when you start your app/script it throws that error when you require |
Same here installing |
Let's reopen this. |
I've tried to create an isolated example, but have not succeeded on my laptop, which runs OS X El Capitan with yarn 0.17.2. The issue I had yesterday was on a different version I believe, will have to recheck later today. |
{
"name": "test",
"dependencies": {
"bcrypt": "^0.8.7"
}
}
require('bcrypt'); After
The whole directory node.js: v7.1.0 |
Yes, I was going to suggest the same reproduction steps, but it seems to work on my current device. Will try again on the problematic device and try to provide additional details. |
Is it the same as #1852, i.e. install script not running on install? |
@bestander sort of… except that bcrypt v0.8.7 doesn't have an explicit script |
We build bcrypt with yarn on our CI server frequently-- currently with 0.16.1-- and see intermittent failures. That could explain why some people see the issue here and some don't. I currently have no idea what triggers the failure, but will be looking at it some today, as I'm trying to run |
@gitawego I see the error Could not locate the bindings file. at run time. Do you see any errors at build time, when running |
Can anyone confirm if this is a regression from 0.16.1? |
@markstos @bestander We run 0.16.1 locally in Docker and get the "Could not locate the bindings file" from time to time as well. Didn't test 0.17 though. Sometimes it happens right after a Unfortunately, we cannot reproduce the cause. I suspect it to be yarn's cache. Maybe that's also tied to the inconsistent re-builds of native modules. |
@hpurmann I also suspect there's an issue with the cache, but can't pin it down. Today I had luck replacing a |
I had my last bcrypt failure today. I was also getting "Could not locate bindings file" error. It didn't seem to matter if I used |
@markstos "slightly" slower is actually about 3-4 times slower, as I have tested several weeks ago. I would recommend that instead of switching to bryptjs, you instead switch from yarn back to npm. The issue here is not with bcrypt, but with yarn. It just seems yarn is not mature and stable enough to be a complete drop-in replacement for npm yet. Hopefully this and other issues that prevent that will be addressed and fixed soon though, as I do love the speed of yarn. |
I can repro on a fresh Ubuntu 16.04 Docker container
|
@bestander I confirmed that this is a regression from 0.16.1. It looks like |
workaround: run I have the same problem with 0.17.4 on El Capitan, even after clearing all caches (both the Library/Yarn one and .yarn-cache from the previous versions) |
@wmertens, |
A possible fix #1935 |
it doesn't work neither with --force flag. hope the #1935 could fix the prob. |
I'll push 0.17.5 in a couple of hours On 18 November 2016 at 18:30, Hongbo LU [email protected] wrote:
|
Should be fixed with 3f765c3 in 0.17.5, please report if not |
@bestander This is unfortunately not fixed in 0.17.5. I still have to run |
@hph, can you help me to sort it out then? |
I confirmed that v0.17.5 worked here (node v7.1.0, Arch Linux). I also reverted to v0.17.3, did the same process, upgraded back to v0.17.5 and confirmed that it works now. |
I can also confirm that it works for me. I upgraded to 0.17.5, did a yarn install --force to get the bad cache sorted, and it works. |
Ok, let's close this issue and open a new one for 0.17.5 |
@bestander Sorry for the confusion, I can confirm that it does indeed work (on Mac, latest Node.js, latest Yarn). Thanks for addressing this so quickly and for the prompt release! |
No issues anymore building bcrypt with Yarn 0.17.6. Thanks for the quick response to this. |
I'm seeing this issue come up in Yarn v0.20.0, Feb 16 14:23:21 positron-staging app/web.1: Uncaught Exception Error: Could not locate the bindings file. Tried: |
@eessex If you never want to deal with this issue again, switching to brcryptjs just takes a few minutes if you can deal with the speed hit. See my related comment above. If you want to troubleshoot the issue with Yarn v0.20.0, please provide steps to reproduce including which version of bcrypt you were trying to install. |
Thanks @markstos, using the bcryptjs npm package did the trick |
Switching to bcryptjs is unfortunately not an option for us due to the speed penalty (up to 5x slower in some cases) |
Same here, with the newest version v0.21.3. Not just bcrypt,node-sass,dtrace(bunyan), terk-capture, all need rebuild after install any new package. |
Same here. Also bcrypt. Yarn v0.21.3 |
This is currently blocking us from using yarn also. Can we have this reopened? |
@holm, please open a new issue with repro steps |
still happening for me in v1.0.1 in alpine linux |
Do you want to request a feature or report a bug?
bug
What is the current behavior?
failed to build bcrypt correctly. it gives error:
If the current behavior is a bug, please provide the steps to reproduce.
just install bcrypt
What is the expected behavior?
it should build correctly bcrypt. it works with npm. after
npm rebuild
, it works normally.Please mention your node.js, yarn and operating system version.
node 6.8.0 yarn: 0.17.0 ubuntu 16.10
The text was updated successfully, but these errors were encountered: