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: package search #3713

Merged
merged 2 commits into from
Apr 4, 2023
Merged

fix: package search #3713

merged 2 commits into from
Apr 4, 2023

Conversation

jzhangdev
Copy link

Resolve #3709 .

@jzhangdev jzhangdev changed the title Fix package search fix: package search Apr 3, 2023
@juanpicado
Copy link
Member

juanpicado commented Apr 3, 2023

Your solution is good, but I'd recommend this instead, so is completely forced by code for any version that has already installed and old config.yaml file, the search remote is a new feature from 6.x still experimental and cannot be used in 5.x

diff --git a/src/lib/cli/commands/init.ts b/src/lib/cli/commands/init.ts
index c322e689..e2f26f69 100644
--- a/src/lib/cli/commands/init.ts
+++ b/src/lib/cli/commands/init.ts
@@ -75,6 +75,12 @@ export class InitCommand extends Command {
         configParsed.https = { enable: false };
       }
 
+      configParsed.flags = {
+        ...configParsed.flags,
+        // on this version there is no remote search
+        searchRemote: false,
+      };
+
       process.title = (configParsed.web && configParsed.web.title) || 'verdaccio';
 
       startVerdaccio(

@juanpicado juanpicado added this to the 5.x milestone Apr 3, 2023
Copy link
Member

@juanpicado juanpicado left a comment

Choose a reason for hiding this comment

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

LGTM

@juanpicado juanpicado merged commit 1029d7a into verdaccio:5.x Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants