Skip to content

Nodejs devfile reports invalid arguments #2085

@jrichter1

Description

@jrichter1

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions