Skip to content

Nodejs devfile reports invalid arguments #2085

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

Closed
jrichter1 opened this issue Apr 14, 2021 · 1 comment · Fixed by #2086
Closed

Nodejs devfile reports invalid arguments #2085

jrichter1 opened this issue Apr 14, 2021 · 1 comment · Fixed by #2086

Comments

@jrichter1
Copy link
Contributor

Creating a component from nodejs devfile, after filling in all the forms, get this error:

Error: Command failed: "/home/jrichter/.vscode/extensions/redhat.vscode-openshift-connector-0.2.4/out/tools/linux/odo" create nodejs comp --context /tmp/odo/1 --app app --project default --starter nodejs-starter
Error: accepts between 0 and 2 arg(s), received 3
Usage:
  odo create <component_type> [component_name] [flags]

Examples:
  # Create a new Node.JS component with existing sourcecode as well as specifying a name
  odo create nodejs mynodejs
  
  # Name is not required and will be automatically generated if not passed
  odo create nodejs
  
  # List all available components before deploying
  odo catalog list components
  odo create java-quarkus
  
  # Download an example devfile and application before deploying
  odo create nodejs --starter
  
  # Using a specific devfile
  odo create mynodejs --devfile ./devfile.yaml
  odo create mynodejs --devfile https://raw.githubusercontent.com/odo-devfiles/registry/master/devfiles/nodejs/devfile.yaml
  
  # Create new Node.js component named 'frontend' with the source in './frontend' directory
  odo create nodejs frontend --context ./frontend
  
  # Create new Java component with binary named sample.jar in './target' directory
  odo create java:8  --binary target/sample.jar
  
  # Create new Node.js component with source from remote git repository
  odo create nodejs --git https://github.com/openshift/nodejs-ex.git
  
  # Create new Node.js component with custom ports and environment variables
  odo create nodejs --port 8080,8100/tcp,9100/udp --env key=value,key1=value1

Flags:
      --app string                                        Application, defaults to active application
  -b, --binary string                                     Create a binary file component component using given artifact. Works only with Java components. File needs to be in the context directory.
      --context string                                    Use given context directory as a source for component settings
      --devfile string                                    Path to the user specified devfile
      --env strings                                       Environmental variables for the component. For example --env VariableName=Value
  -g, --git string                                        Create a git component using this repository.
  -h, --help                                              Help for create
      --now                                               Push changes to the cluster immediately
  -p, --port strings                                      Ports to be used when the component is created (ex. 8080,8100/tcp,9100/udp)
      --project string                                    Project, defaults to active project
  -r, --ref string                                        Use a specific ref e.g. commit, branch or tag of the git repository (only valid for --git components)
      --registry string                                   Create devfile component from specific registry
      --s2i                                               Enforce S2I type components
      --starter string[="devfile-starter-project-name"]   Download a project specified in the devfile
      --starter-token string                              Token to be used when downloading starter project
      --token string                                      Token to be used when downloading devfile from the devfile path that is specified via --devfile

Additional Flags:
  -o, --o string             Specify output format, supported format: json
  -v, --v Level              Number for the log level verbosity. Level varies from 0 to 9 (default 0).
      --vmodule moduleSpec   Comma-separated list of pattern=N settings for file-filtered logging

 ✗  accepts between 0 and 2 arg(s), received 3

@dgolovin dgolovin self-assigned this Apr 14, 2021
@dgolovin dgolovin added this to the v0.2.5 milestone Apr 14, 2021
@dgolovin dgolovin reopened this Apr 14, 2021
@dgolovin
Copy link
Collaborator

apparently, --starter option is supporting only --starter=starter-project syntax and --starter starter-project is not supported.

dgolovin added a commit to dgolovin/vscode-openshift-tools that referenced this issue Apr 15, 2021
dgolovin added a commit that referenced this issue Apr 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants