Skip to content

nodejs-react devfile based components fails to start when pushed to cluster #891

Closed
@dgolovin

Description

@dgolovin

/kind bug

Which area this bug is related to?

/area registry

What versions of software are you using?

Operating System: Linux

Go Pkg Version: n/a

Bug Summary

Describe the bug:

Components created using registry devfile and starter project should be pushed without error and modification in source code.

nodejs react component is not starting after pushing it to the cluster.

To Reproduce:

  1. Create component using nodejs react devfile
  2. Push it to cluster
  3. Open route in browser

url is not accessible

Expected behavior

should open starter project index page.

Any logs, error output, screenshots etc? Provide the devfile that sees this bug, if applicable.

Last 20 lines of the component's log:
time="2022-07-14T01:15:28Z" level=info msg="try to start program" program=devrun 
time="2022-07-14T01:15:28Z" level=info msg="success to start program" program=devrun 
ODO_COMMAND_RUN is npm run start
Changing directory to ${PROJECT_SOURCE}
Executing command cd ${PROJECT_SOURCE} && npm run start
npm ERR! Missing script: "start"
npm ERR! 
npm ERR! Did you mean one of these?
npm ERR!     npm star # Mark your favorite packages
npm ERR!     npm stars # View packages marked as favorites
npm ERR! 
npm ERR! To see a list of scripts, run:
npm ERR!   npm run

npm ERR! A complete log of this run can be found in:
npm ERR!     /opt/app-root/src/.npm/_logs/2022-07-14T01_15_28_333Z-debug-0.log
time="2022-07-14T01:15:29Z" level=debug msg="wait program exit" program=devrun 
time="2022-07-14T01:15:29Z" level=error msg="program stopped with error:exit status 1" program=devrun 
time="2022-07-14T01:15:29Z" level=info msg="Don't start the stopped program because its retry times 0 is greater than start retries 0" program=devrun 
To get the full log output, please run 'odo log'

Pushing devfile component "nodejs-react-starter"

Additional context

Any workaround?

Rename 'dev' script to 'start' in package.json, or change start command in devfile to node start dev

Suggestion on how to fix the bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions