Fix BinaryToolsJS native binary loading and platform package configuration #19
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the
Cannot find module '@rick-29/binary-options-tools-win32-x64-msvc'error that occurs when users try to use the BinaryToolsJS package. The issue was caused by misconfigured platform packages and missing native binaries.Root Cause
The Node.js package uses a two-tier loading strategy:
.nodebinaries (for development)However, several issues prevented this from working:
Changes Made
🔧 Build System Fixes
BinaryOptionsToolsJsto main Cargo workspace membersbinary-options-tools→binary-options-tools-js)📦 Platform Package Configuration
🚨 Enhanced Error Handling
🛠️ Development Tools
setup-dev.shscript for local development environment setupnpm run setup-devcommand for easy platform package installationtest-fix.js) to validate all scenarios📚 Documentation
Testing
The fix has been validated across multiple scenarios:
✅ Local Binary Loading: Works when binaries are built locally
✅ Platform Package Fallback: Successfully loads from installed platform packages
✅ Error Messaging: Provides clear guidance when binaries are missing
✅ Development Mode:
npm run build && npm run setup-devworks correctlyUsage
For users experiencing the error:
Supported Platforms
Fixes #18.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/repos/ChipaDevTeam/BinaryOptionsTools-v2/releasesnode /home/REDACTED/work/BinaryOptionsTools-v2/BinaryOptionsTools-v2/BinaryOptionsToolsJs/node_modules/.bin/napi prepublish -t npm(http block)If you need me to access, download, or install something from one of these locations, you can either:
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.