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

Added --force to rebuild native modules #511

Merged
merged 4 commits into from
Apr 20, 2017
Merged

Added --force to rebuild native modules #511

merged 4 commits into from
Apr 20, 2017

Conversation

wyattjoh
Copy link
Collaborator

What does this PR do?

Adds a --force flag to the yarn install process so that when installing dependancies, we ensure that native modules are rebuilt.

How do I test this PR?

  1. Build images locally: ./scripts/docker.sh
  2. Create a new folder (elsewhere on your harddrive) and create a Dockerfile in it with the following content:
FROM coralproject/talk:latest-onbuild
  1. Build the docker image: docker build -t coralproject/talk:pr-test .
  2. Run the image docker run --rm -ti coralproject/talk:pr-test bash
  3. Run the following node models/user.js

There should be an error (specifically about not connecting to the database), but you should no longer see an error related to bcrypt not being installed.

This issue is related to an upstream issue with yarn: yarnpkg/yarn#756

@wyattjoh wyattjoh added the bug label Apr 20, 2017
Copy link

@jde jde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following the steps in the pr leads to a bcrypt error for me:

...
tmp :) ]$ docker run --rm -ti coralproject/talk:pr-test bash
root@b72f8b54aaff:/usr/src/app# node models/user.js
module.js:472
    throw err;
    ^

Error: Cannot find module '/usr/src/app/node_modules/bcrypt/lib/binding/bcrypt_lib.node'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
...

@jde jde merged commit 6075317 into master Apr 20, 2017
@jde jde deleted the build-fix branch April 20, 2017 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants