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

fix Node binary incompatibility #155

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion packages/synthetic-chain/src/cli/doctor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ const fixupProposal = (proposal: ProposalInfo) => {

// refresh install
execSync('rm -rf node_modules', { cwd: proposalPath });
execSync('yarn install', { cwd: proposalPath });
// install to update yarn.lock and get importable typed modules but
// skip building because the proposal never runs on the local filesystem.
Copy link
Member

Choose a reason for hiding this comment

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

my mental model is missing something...

What provides the binaries when the proposal runs?

Copy link
Member Author

Choose a reason for hiding this comment

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

node_modules in the Docker image. It's already there. I had hoped that the mount would only be an overlay, but that was wrong. With mounting there's no way around running yarn install inside the container. I'll try to automate that so the developer doesn't have to remember/know.

// Without this the local environment may install binaries (e.g. better_sqlite3.node)
// that fail when mounted in the Docker environment by the test debug mode.
execSync('yarn install --mode=skip-build', { cwd: proposalPath });
}
}
};
Expand Down