Skip to content
This repository was archived by the owner on Aug 1, 2023. It is now read-only.

Conversation

@zone117x
Copy link
Contributor

@zone117x zone117x commented Jul 15, 2020

Closes #54

The problem was the package.json bin entry script was pointing to the compiled js in lib/ which isn't committed to the repo, and the post-install build script is not ran in certain environments.

This PR changes the bin script to load the *.ts files directly via ts-node, rather than depending on post-install scripts to behave consistently across different environments.

Testing

Test using an installation of nodejs from official packages and not from nvm -- these installation methods seem to cause a difference in how global package install scripts are ran.

Using npm global install on MacOS/Linux:

sudo npm install -g "https://github.com/blockstack/cli-blockstack#fix/global-install-bug"
blockstack make_keychain -t > new_keychain.txt

Using npm global install on Windows:

npm install -g "https://github.com/blockstack/cli-blockstack#fix/global-install-bug"
blockstack make_keychain -t > new_keychain.txt

Using npx:

npx "https://github.com/blockstack/cli-blockstack#fix/global-install-bug" make_keychain -t > new_keychain.txt

Using yarn global install:

yarn global add "https://github.com/blockstack/cli-blockstack#fix/global-install-bug" --prefix ~/
~/bin/blockstack make_keychain -t > new_keychain.txt

Reviewer note

PR includes minor type fixes required after updating to latest typescript lib.

@zone117x zone117x force-pushed the fix/global-install-bug branch from a2d6c53 to 558152a Compare July 15, 2020 14:42
@zone117x zone117x self-assigned this Jul 15, 2020
@zone117x zone117x requested review from agraebe and yknl July 15, 2020 15:06
@zone117x zone117x added this to the 2020 W29-W31 milestone Jul 15, 2020
Copy link

@agraebe agraebe left a comment

Choose a reason for hiding this comment

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

awesome! works for me on osx

Copy link
Contributor

@yknl yknl left a comment

Choose a reason for hiding this comment

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

Thanks for the fix! This was difficult to track down.

@zone117x zone117x merged commit f11fca5 into feature/stacks-2.0-tx Jul 16, 2020
@agraebe agraebe linked an issue Jul 16, 2020 that may be closed by this pull request
@agraebe agraebe requested a review from timstackblock July 16, 2020 19:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

make_keychain error: Module not found

4 participants