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(cli plugins): don't load all redwoodjs plugins #8491

Closed
wants to merge 1 commit into from

Conversation

jtoar
Copy link
Contributor

@jtoar jtoar commented Jun 1, 2023

Redwood version: 6.0.0-canary.322+300c35876.

Quick fix to #8454. @Josh-Walker-GM, feel free to redo this, but I'm going to merge this one as a temporary fix for the time being. Right now, canary will try to install the @redwoodjs/cli-storybook package no matter which rw command you run:

cli-storybook.mov

I think it's an error in the plugin loading logic here when the namespace is @redwoodjs. This PR doesn't fix the MODULE_NOT_FOUND error, just stops the CLI from installing storybook on any CLI invocation.

@jtoar jtoar added the release:fix This PR is a fix label Jun 1, 2023
@replay-io
Copy link

replay-io bot commented Jun 1, 2023

15 replays were recorded for f7b7482.

image 0 Failed
image 15 Passed

View test run on Replay ↗︎

@Josh-Walker-GM
Copy link
Collaborator

Okay I think I understand why this is happening. The loading logic hasn't considered the built in commands. It attempts to find a package which can satisfy a built in command (e.g. info) but can't because it's built in to the CLI. As a fallback it loads all plugins in that case.

I also did not handle the case of rw --version which I will also address. Any other top level flags apart from --help and --version?

@jtoar
Copy link
Contributor Author

jtoar commented Jun 2, 2023

@Josh-Walker-GM the only other one I can think of is --cwd but that's handled by the CLI before it gets to yargs so it may not need any special treatment.

@jtoar
Copy link
Contributor Author

jtoar commented Jun 2, 2023

Closing in favor of #8494

@jtoar jtoar closed this Jun 2, 2023
@jtoar jtoar deleted the ds-cli-plugins/dont-load-all-rwjs-plugins branch June 13, 2023 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:fix This PR is a fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants