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

sf plugins install failed (does not exist in the registry) #2564

Closed
Arkin69 opened this issue Nov 10, 2023 · 18 comments · Fixed by oclif/plugin-plugins#718
Closed

sf plugins install failed (does not exist in the registry) #2564

Arkin69 opened this issue Nov 10, 2023 · 18 comments · Fixed by oclif/plugin-plugins#718
Labels
bug Issue or pull request that identifies or fixes a bug investigating We're actively investigating this issue validated Version information for this issue has been validated

Comments

@Arkin69
Copy link

Arkin69 commented Nov 10, 2023

Summary

Hi i can't install any plugin with the command sf plugins install.
I have tried community or custom-metadata plugin. Same issue

Steps To Reproduce

sf plugins install @salesforce/plugin-community

Actual result

sf plugins install @salesforce/plugin-community
Polling for new version(s) to become available on npm... done
Successfully validated digital signature for @salesforce/plugin-community.
Finished digital signature check.
Installing plugin community@latest... failed
» Error: @salesforce/plugin-community does not exist in the registry.

sf plugins install @salesforce/plugin-custom-metadata
Polling for new version(s) to become available on npm... done
Successfully validated digital signature for @salesforce/plugin-custom-metadata.
Finished digital signature check.
Installing plugin custom-metadata@latest... failed
» Error: @salesforce/plugin-custom-metadata does not exist in the registry.

/AppData/Local/sf/error.log :
image

System Information

Powershell 7.3.9

sf version --verbose --json

{
  "architecture": "win32-x64",
  "cliVersion": "@salesforce/cli/2.17.10",
  "nodeVersion": "node-v20.9.0",
  "osVersion": "Windows_NT 10.0.22631",
  "rootPath": "C:\\Users\\XXX YYY\\AppData\\Local\\sf\\client\\2.17.10-f9433bf",
  "shell": "cmd.exe",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 3.0.1 (core)",
    "@oclif/plugin-commands 3.0.6 (core)",
    "@oclif/plugin-help 6.0.5 (core)",
    "@oclif/plugin-not-found 3.0.3 (core)",
    "@oclif/plugin-plugins 4.1.0 (core)",
    "@oclif/plugin-search 1.0.6 (core)",
    "@oclif/plugin-update 4.1.3 (core)",
    "@oclif/plugin-version 2.0.6 (core)",
    "@oclif/plugin-warn-if-update-available 3.0.2 (core)",
    "@oclif/plugin-which 3.0.8 (core)",
    "@salesforce/cli 2.17.10 (core)",
    "apex 2.3.20 (core)",
    "auth 2.8.26 (core)",
    "data 2.6.3 (core)",
    "deploy-retrieve 1.20.0 (core)",
    "info 3.0.1 (core)",
    "limits 3.0.1 (core)",
    "login 2.0.1 (core)",
    "marketplace 1.0.2 (core)",
    "org 2.11.8 (core)",
    "schema 3.0.1 (core)",
    "settings 2.0.2 (core)",
    "sobject 0.2.15 (core)",
    "source 2.11.0 (core)",
    "telemetry 3.1.0 (core)",
    "templates 55.5.18 (core)",
    "trust 3.0.1 (core)",
    "user 2.3.42 (core)"
  ]
}
@Arkin69 Arkin69 added the investigating We're actively investigating this issue label Nov 10, 2023
Copy link

Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.

@github-actions github-actions bot added the validated Version information for this issue has been validated label Nov 10, 2023
@naixlesl
Copy link

Had the same problem today!

I did an update earlier today on the @salesforce/cli from version 2.15.9 to the latest version and then everything broke down.
Couldnt find the node_module packages (including @salesforce/plugin-packaging).

After a lot of hassle I just reverted back to cli version 2.15.9 and then it could find the packaging.

Hope that helps other people that resently updated!

@weawer
Copy link

weawer commented Nov 10, 2023

same issue here. Seems like the dependency plugin-packaging v1.27.1 cannot be found even though i can find it on npm. Installing the version directly from npm does not seem to help

@Arkin69
Copy link
Author

Arkin69 commented Nov 10, 2023

How can i rollback with sf v2 without the npm command ?

Because sf plugins install @salesforce/[email protected] failed too :)

@naixlesl
Copy link

naixlesl commented Nov 10, 2023

I just uninstalled the cli with npm with these two commands:
npm uninstall sfdx-cli --global
npm uninstall @salesforce/cli --global

and then installed cli again with the earlier version:
npm install -g @salesforce/[email protected]

Not sure how to do it without "npm"...

@shetzel
Copy link
Contributor

shetzel commented Nov 10, 2023

Thanks for reporting. This appears to be Windows only. Can someone please run a plugin install with --dev-debug and report a relevant snippet around the failure? E.g., node npm-cli.js show <plugin> dist-tags

@mshanemc
Copy link
Contributor

How can i rollback with sf v2 without the npm command ? Because sf plugins install @salesforce/[email protected] failed too :)

sf update --version 2.15.9

@mshanemc
Copy link
Contributor

@weawer @naixlesl @Arkin69 We just patched the CLI for #2562.
This fix was to the same oclin plugin, so it should be patched, too...you got it early as a side effect.

I'm closing the issue, but would appreciate confirmation that it's working now.

@Arkin69
Copy link
Author

Arkin69 commented Nov 13, 2023

Hi @mshanemc

The new release don't fix the issue :

sf version --verbose --json
{
  "architecture": "win32-x64",
  "cliVersion": "@salesforce/cli/2.17.13",
  "nodeVersion": "node-v20.9.0",
  "osVersion": "Windows_NT 10.0.22631",
  "rootPath": "C:\\Users\\XXX YYY\\AppData\\Local\\sf\\client\\2.17.13-ce36672",
  "shell": "cmd.exe",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 3.0.1 (core)",
    "@oclif/plugin-commands 3.0.6 (core)",
    "@oclif/plugin-help 6.0.5 (core)",
    "@oclif/plugin-not-found 3.0.3 (core)",
    "@oclif/plugin-plugins 4.1.4 (core)",
    "@oclif/plugin-search 1.0.6 (core)",
    "@oclif/plugin-update 4.1.3 (core)",
    "@oclif/plugin-version 2.0.6 (core)",
    "@oclif/plugin-warn-if-update-available 3.0.2 (core)",
    "@oclif/plugin-which 3.0.8 (core)",
    "@salesforce/cli 2.17.13 (core)",
    "apex 2.3.20 (core)",
    "auth 2.8.26 (core)",
    "data 2.6.3 (core)",
    "deploy-retrieve 1.20.0 (core)",
    "info 3.0.1 (core)",
    "limits 3.0.1 (core)",
    "login 2.0.1 (core)",
    "marketplace 1.0.2 (core)",
    "org 2.11.8 (core)",
    "schema 3.0.1 (core)",
    "settings 2.0.2 (core)",
    "sobject 0.2.15 (core)",
    "source 2.11.0 (core)",
    "telemetry 3.1.0 (core)",
    "templates 55.5.18 (core)",
    "trust 3.0.2 (core)",
    "user 2.3.42 (core)"
  ]
}

sf plugins install @salesforce/plugin-custom-metadata
Polling for new version(s) to become available on npm... done
Successfully validated digital signature for @salesforce/plugin-custom-metadata.
Finished digital signature check.
Installing plugin custom-metadata@latest... failed
» Error: @salesforce/plugin-custom-metadata does not exist in the registry.

Can you reopen this issue ?

@Arkin69
Copy link
Author

Arkin69 commented Nov 13, 2023

@mshanemc
After rolling back to 2.15.9 I was able to install plugins but the issue still exists with the latest release 2.17.13

@Arkin69
Copy link
Author

Arkin69 commented Nov 13, 2023

@mshanemc up?

@mshanemc mshanemc reopened this Nov 13, 2023
@shetzel shetzel added the bug Issue or pull request that identifies or fixes a bug label Nov 13, 2023
Copy link

git2gus bot commented Nov 13, 2023

This issue has been linked to a new work item: W-14480077

@cristiand391
Copy link
Member

Hey @Arkin69, my fix for this last Friday worked when installing sf from npm on windows but after I seeing your comment this morning I confirmed it was still failing if you installed the CLI via the installer or tarballs (windows only).

We pushed a fix for this which will be available in the nightly channel in a few hours for testing, then we'll patch latest-rc so that the fix gets promoted on Wednesday 15 to the stable channel.

Sorry for all the trouble! we have bunch of tests on CI but this bug only happens if you have a space in the path where your CLI is installed (which in GitHub Actions isn't a problem b/c so all of our tests just passed).

@erocheleau
Copy link

erocheleau commented Nov 13, 2023

Hi, I don't want to de-rail the issue, but I think this might be related?
In my CI run, the plugin community started failing to install:

sfdx force:community:publish ................

Installing plugin [email protected]... failed
 ›   Warning: node:internal/errors:496
 ›   Warning: ErrorCaptureStackTrace(err);
 ›   Warning: ^
 ›   Warning: Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'ts-node' 
 ›   imported from /home/runner/.local/share/sf/
 ›   Warning: at new NodeError (node:internal/errors:405:5)
 ›   Warning: at packageResolve (node:internal/modules/esm/resolve:890:9)
 ›   Warning: at moduleResolve (node:internal/modules/esm/resolve:939:20)
 ›   Warning: at defaultResolve (node:internal/modules/esm/resolve:1132:11)
 ›   Warning: at nextResolve (node:internal/modules/esm/loader:163:28)
 ›   Warning: at ESMLoader.resolve (node:internal/modules/esm/loader:835:30)
 ›   Warning: at ESMLoader.getModuleJob 
 ›   (node:internal/modules/esm/loader:424:18)
 ›   Warning: at ESMLoader.import (node:internal/modules/esm/loader:524:22)
 ›   Warning: at loadModulesInIsolation 
 ›   (node:internal/process/esm_loader:92:34)
 ›   Warning: at initializeLoader (node:internal/process/esm_loader:61:25) {
 ›   Warning: code: 'ERR_MODULE_NOT_FOUND'
 ›   Warning: }
 ›   Warning: Node.js v18.18.2
    JitPluginInstallError: Could not install @salesforce/plugin-community
    Code: JitPluginInstallError

I know it's still the sfdx command, however the version of @salesforce/cli is @salesforce/cli/2.16.10 linux-x64 node-v18.18.2.

This is on ubuntu system btw

I can try to update my commands usage to the newer sf version, but this was an old file I was hoping would be compatible.

@cristiand391
Copy link
Member

@Arkin69 can you try updating to nightly then installing a plugin?

update to nightly:

sf update nightly

then sf -v should return 2.18.6 or higher.

and sf plugins install @salesforce/plugin-custom-metadata.

updating to nightly docs:
https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_update_cli.htm#sfdx_setup_install_cli_rc

@cristiand391
Copy link
Member

@cristiand391
Copy link
Member

cristiand391 commented Nov 16, 2023

The fix for this was shipped in the latest stable release sf v2.17.14 (will update our release notes in a bit).

@erocheleau
Copy link

erocheleau commented Nov 23, 2023

@erocheleau that looks like a different error, can you file a new issue: https://github.com/forcedotcom/cli/issues/new?assignees=&labels=investigating&projects=&template=bug_report.md&title=

@cristiand391

Sorry I missed that reply.

Well my solution was to manually install the community plugin before running my tests.

I believe the cause was that the test run is executed through ts-node.
So the environment running the exec command is already a little wonky, I think the command to install the plugins that sfdx is trying to run might be looking for the executant instead of actually for example using sfdx or node directly? Is that possible?

I think because the command is effectively ts-node somefile.ts > exec('sfdx force:community:publish') is it possible that it's trying to run also something like ts-node sfdx plugin install ? And it doesn't know what the ts-node actually is in that context?

Anyway I got it working for my use-case, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue or pull request that identifies or fixes a bug investigating We're actively investigating this issue validated Version information for this issue has been validated
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants