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.
Currently, we run
npm i -g generator-swiftserver
every time a user invokeskitura init
orkitura create
. This ensures that the generator is installed into the user's NPM global package directory.We are unable to install the generator during Homebrew installation of the CLI because Homebrew installs global packages into Cellars which Yeoman can't find, and we can't trick Yeoman without breaking people who are using tools like
nvm
.NPX is a relatively new addition to the Node.js ecosystem which simplifies the running of CLI tools from the registry (like Yeoman) and makes it unnecessary to install global packages at all.
This PR updates the Kitura CLI so it invokes Yeoman via
npx
. A consequence of this is we will be able to simplify the Homebrew installation of the CLI so it does not have to install Yeoman either.My belief is that this will sidestep a whole bunch of rare NPM issues that users have reported.