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

Add seperate logic for rebuilding with yarn #341

Closed
wants to merge 1 commit into
base: yarn
from

Conversation

Projects
None yet
2 participants
@kauffecup

kauffecup commented Nov 11, 2016

From the Migrating from npm docs, we can see that we should use:

yarn install --force

Instead of

npm rebuild

When rebuilding. This PR handles this!

@hunterloftis

This comment has been minimized.

Show comment
Hide comment
@hunterloftis

hunterloftis Dec 15, 2016

Contributor

Thanks for opening a PR!

We allow checking in node_modules with npm because npm doesn't have a reliable way to force deterministic dependencies. However, yarn does, so now that there's a workable solution we're going to be very strict about disallowing prebuilt modules.

  • if $YARN; then
    if [ -e "$BUILD_DIR/node_modules" ]; then
    warn "node_modules checked into source control" "https://blog.heroku.com/node-habits-2016#9-only-git-the-important-bits"
    rm -rf "$BUILD_DIR/node_modules"
    fi
    fi
Contributor

hunterloftis commented Dec 15, 2016

Thanks for opening a PR!

We allow checking in node_modules with npm because npm doesn't have a reliable way to force deterministic dependencies. However, yarn does, so now that there's a workable solution we're going to be very strict about disallowing prebuilt modules.

  • if $YARN; then
    if [ -e "$BUILD_DIR/node_modules" ]; then
    warn "node_modules checked into source control" "https://blog.heroku.com/node-habits-2016#9-only-git-the-important-bits"
    rm -rf "$BUILD_DIR/node_modules"
    fi
    fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment