Skip to content
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

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

Closed
dgolovin opened this issue Jul 14, 2022 · 5 comments
Closed
Labels
kind/bug Something isn't working

Comments

@dgolovin
Copy link

/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

@openshift-ci openshift-ci bot added the kind/bug Something isn't working label Jul 14, 2022
@elsony
Copy link
Contributor

elsony commented Jul 14, 2022

Based on the error, it looks like this problem should be addressed by devfile/registry#117

@schultzp2020
Copy link
Contributor

Fixed in devfile/registry#117

@schultzp2020
Copy link
Contributor

@dgolovin This was caused from me updating the react starter project so I could pass the tests on the registry. To my knowledge,, I don't think there is anyway around this because our tests in the registry require an up to date starter project which creates a temporary mismatch between the starter project and the devfile.

@dgolovin
Copy link
Author

@schultzp2020 that sounds like right conclusion. @elsony just pointed out in chat that introduction of multiple stack versions support should address that, "but devfiles in the registry has not take advantage on that yet".

@dgolovin
Copy link
Author

@schultzp2020 I cannot replicate that issue anymore. Thank you for quick update!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants