cli icon indicating copy to clipboard operation
cli copied to clipboard

`sf dev generate library` does not seem to be working properly

Open catalandres opened this issue 1 year ago • 2 comments

Summary

The command sf dev generate library does not produce the expected result.

Steps To Reproduce

  • Run the command sf dev generate library, hit enter. 🙂

Expected result

Quoting the help of the command, emphasis added:

This command is interactive. You're prompted for information to populate the new library, such as the npm scope (which must start with "@"), the name and description of the library, and its GitHub organization. The command clones the 'forcedotcom/library-template' GitHub repository, installs the library's npm package dependencies using yarn install, and updates the package properties. When the command completes, your new library contains a few sample source and test files to get you started.

Actual result

% sf dev generate library
Time to build a library!
? Npm Scope (should start with @) @catalandres
? Name some-library
? Description Meh
? Github Org catalandres
Cloning into '[...]/some-library'...
ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
✖ An error occured while running sf:library#prompting
Error (1): ENOENT: no such file or directory, lstat '[...]/some-library/.git'

System Information

{
  "architecture": "darwin-arm64",
  "cliVersion": "@salesforce/cli/2.30.8",
  "nodeVersion": "node-v20.11.1",
  "osVersion": "Darwin 23.4.0",
  "rootPath": "/Users/andres/.nvm/versions/node/v20.11.1/lib/node_modules/@salesforce/cli",
  "shell": "zsh",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 3.0.9 (core)",
    "@oclif/plugin-commands 3.1.4 (core)",
    "@oclif/plugin-help 6.0.13 (core)",
    "@oclif/plugin-not-found 3.0.11 (core)",
    "@oclif/plugin-plugins 4.2.5 (core)",
    "@oclif/plugin-search 1.0.16 (core)",
    "@oclif/plugin-update 4.1.13 (core)",
    "@oclif/plugin-version 2.0.12 (core)",
    "@oclif/plugin-warn-if-update-available 3.0.12 (core)",
    "@oclif/plugin-which 3.1.0 (core)",
    "@salesforce/cli 2.30.8 (core)",
    "apex 3.0.25 (core)",
    "auth 3.3.13 (core)",
    "data 3.1.1 (core)",
    "deploy-retrieve 3.2.16 (core)",
    "dev 2.1.13 (user)",
    "env 3.0.25 (user)",
    "info 3.0.27 (core)",
    "limits 3.1.10 (core)",
    "marketplace 1.0.25 (core)",
    "org 3.3.14 (core)",
    "packaging 2.1.10 (core)",
    "schema 3.1.3 (core)",
    "settings 2.0.27 (core)",
    "sobject 1.1.13 (core)",
    "source 3.1.15 (core)",
    "telemetry 3.1.13 (core)",
    "templates 56.0.16 (core)",
    "trust 3.3.10 (core)",
    "user 3.2.11 (core)"
  ]
}

Additional information

Note how the help text for the command says that...

The command clones the 'forcedotcom/library-template' GitHub repository

...however, https://github.com/forcedotcom/library-template either does not exist or is not publicly accessible.

catalandres avatar Mar 11 '24 22:03 catalandres

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[bot] avatar Mar 11 '24 22:03 github-actions[bot]

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

git2gus[bot] avatar Mar 12 '24 16:03 git2gus[bot]

We've updated the templates used for the libraries - this should be fixed now 😄

WillieRuemmele avatar Apr 08 '24 20:04 WillieRuemmele