Fix randomBytes import#160
Merged
Merged
Conversation
This patch fixes the issue I get when I run `tsc` in a ts project that depends on recent versions of bitbox-sdk:
node_modules/bitbox-sdk/lib/Crypto.ts:1:1
1 import * as randomBytes from "randombytes"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead.
The default typescript tsconfig.json file generated from `tsc --init` has this property set to true. If there are no build errors or other failures resulting from this update, then it would probably be easier for other users to update this.
fix randomBytes import for same reason as Crypto.ts
Closed
christroutner
approved these changes
Nov 21, 2019
christroutner
left a comment
There was a problem hiding this comment.
I ran unit and integration tests against this branch. Everything passed.
|
🎉 This PR is included in version 8.8.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
I'm getting this error with the latest bitbox-sdk. What's the best way to solve this? I already have esModuleInterop in my tsconfig.json I'm using ubuntu WSL on win10, not sure if that matters. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This patch fixes the issues I get when I run
tscin a brand new ts project (after runningtsc --init) that depends on recent versions of bitbox-sdk:node_modules/bitbox-sdk/lib/Crypto.ts:1:1
1 import * as randomBytes from "randombytes"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead.