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

Yarn randomly deletes the native bindings for leveldown #2619

Closed
aaronjensen opened this issue Feb 3, 2017 · 4 comments
Closed

Yarn randomly deletes the native bindings for leveldown #2619

aaronjensen opened this issue Feb 3, 2017 · 4 comments

Comments

@aaronjensen
Copy link

Do you want to request a feature or report a bug?
bug
What is the current behavior?

Occasionally after upgrading packages, yarn appears to delete native bindings for leveldown. I get this error:

/the-link/client/app/actions/changePassword.js] line 1, col 0, Resolve error: Could not locate the bindings file. Tried:
 → /the-link/node_modules/leveldown/build/leveldown.node
 → /the-link/node_modules/leveldown/build/Debug/leveldown.node
 → /the-link/node_modules/leveldown/build/Release/leveldown.node
 → /the-link/node_modules/leveldown/out/Debug/leveldown.node
 → /the-link/node_modules/leveldown/Debug/leveldown.node
 → /the-link/node_modules/leveldown/out/Release/leveldown.node
 → /the-link/node_modules/leveldown/Release/leveldown.node
 → /the-link/node_modules/leveldown/build/default/leveldown.node
 → /the-link/node_modules/leveldown/compiled/6.9.1/linux/x64/leveldown.node (import/no-unresolved)

One potential issue could be that this error happens on docker on our CI build, but we set the --cache-folder to a mounted volume, so it and the node_modules persist.

What is the expected behavior?

Yarn does not delete native bindings on a yarn install

Please mention your node.js, yarn and operating system version.

Node 6.9.0
Yarn 0.19.1
Ubuntu 14

@aaronjensen
Copy link
Author

I should note that, though it is the same library, it doesn't seem to be the same issue in #2496 as there is no build failure and I can run a clean build and it will work.

@n-rook
Copy link

n-rook commented Apr 5, 2017

I've seen a similar issue, but with bcrypt. It looks like the issue is related to caching the node_modules directory. I'm seeing it on a CI build as well.

I've attached three files:

  1. The files in our repo and node_modules cache, filtered by lines that include /bcrypt/.
  2. Yarn's verbose output, filtered by lines that include /bcrypt/.
  3. The files in our repo and node_modules cache, filtered by lines that include /bcrypt/, but after running yarn.

From here, it's pretty clear that yarn decided to delete the bcrypt node binding, but I don't have the time or yarn expertise to tell what the root cause is.

find before yarn.txt
yarn install --verbose.txt
find after yarn.txt

@n-rook
Copy link

n-rook commented Apr 5, 2017

Oh yeah, I'm on yarn 0.21.2.

@bestander
Copy link
Member

This should be fixed by #3224.
If not please report steps to reproduce

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

3 participants