Skip to content

Component create from Git fails if a devfile exists in git repo #3386

@vrubezhny

Description

@vrubezhny

Create Component view cannot be opened when creating a new component from a git, using https://github.com/openshift-evangelists/Wild-West-Frontend app repo:

Uncaught TypeError: Cannot read properties of undefined (reading 'port')
    at SetNameAndFolder (index.js:131409:73)
    at renderWithHooks (index.js:13229:28)
    at mountIndeterminateComponent (index.js:15405:23)
    at beginWork (index.js:16234:24)
    at HTMLUnknownElement.callCallback2 (index.js:5636:24)
    at Object.invokeGuardedCallbackDev (index.js:5661:26)
    at invokeGuardedCallback (index.js:5695:41)
    at beginWork$1 (index.js:19395:17)
    at performUnitOfWork (index.js:18621:23)
    at workLoopSync (index.js:18572:15)
index.js:16871 The above error occurred in the <SetNameAndFolder> component:

    at SetNameAndFolder (https://file+.vscode-resource.vscode-cdn.net/home/jeremy/projects/vscode-openshift-tools/source/vscode-openshift-tools/out/createComponentViewer/index.js:131408:71)
    at FromExistingGitRepo (https://file+.vscode-resource.vscode-cdn.net/home/jeremy/projects/vscode-openshift-tools/source/vscode-openshift-tools/out/createComponentViewer/index.js:131795:34)
    at div

Which maps to line 39 at

const [portNumber, setPortNumber] = React.useState<number>(props.devfile.port);

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

✅ Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions