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

Project in "web-nodejs-with-db-sample" devfile sample is not compatible with node. #15649

Closed
4 of 23 tasks
rhopp opened this issue Jan 10, 2020 · 4 comments · Fixed by redhat-developer/devfile#67
Closed
4 of 23 tasks
Labels
area/samples kind/bug Outline of a bug - must adhere to the bug report template. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. severity/P2 Has a minor but important impact to the usage or development of the system.
Milestone

Comments

@rhopp
Copy link
Contributor

rhopp commented Jan 10, 2020

Describe the bug

Since this commit, the sample cannot be run in workspace created from this sample devfile.

Trying to run the sample ends up with

/projects/nodejs-mongo-app/EmployeeDB/app.js:30
app.use((req, res, next) => {
                          ^
SyntaxError: Unexpected token >
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:935:3

Seems like the node version we are using in this devfile does not support () => {} notation of inline functions.

Che version

  • latest
  • nightly
  • other: please specify

Steps to reproduce

  1. Create workspace from https://github.com/redhat-developer/devfile/blob/master/samples/web-nodejs-with-db-sample/devfile.yaml
  2. Try to run the example
  3. Observe failure.

Expected behavior

Example should be albe to run.

Runtime

  • kubernetes (include output of kubectl version)
  • Openshift (include output of oc version)
  • minikube (include output of minikube version and kubectl version)
  • minishift (include output of minishift version and oc version)
  • docker-desktop + K8S (include output of docker version and kubectl version)
  • other: (please specify)

Screenshots

Installation method

  • chectl
  • che-operator
  • minishift-addon
  • I don't know

Environment

  • my computer
    • Windows
    • Linux
    • macOS
  • Cloud
    • Amazon
    • Azure
    • GCE
    • other (please specify)
  • other: Codeready Workspaces 2.0
@rhopp rhopp added kind/bug Outline of a bug - must adhere to the bug report template. severity/P2 Has a minor but important impact to the usage or development of the system. area/devfile labels Jan 10, 2020
@che-bot
Copy link
Contributor

che-bot commented Aug 21, 2020

Issues go stale after 180 days of inactivity. lifecycle/stale issues rot after an additional 7 days of inactivity and eventually close.

Mark the issue as fresh with /remove-lifecycle stale in a new comment.

If this issue is safe to close now please do so.

Moderators: Add lifecycle/frozen label to avoid stale mode.

@che-bot che-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 21, 2020
@ericwill ericwill added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Aug 21, 2020
@ericwill ericwill added this to the Backlog - Plugins milestone Aug 21, 2020
@ericwill ericwill mentioned this issue Nov 18, 2020
34 tasks
@ericwill ericwill modified the milestones: Backlog - Plugins, 7.23 Nov 18, 2020
@ericwill ericwill mentioned this issue Dec 3, 2020
34 tasks
@sunix
Copy link
Contributor

sunix commented Dec 7, 2020

OK @rhopp so what do we want to do with that ?
The application is just not compiling in Che or any environment since the upgrade to Express 4 in package.json

@sunix
Copy link
Contributor

sunix commented Dec 8, 2020

So several problems:

  • the applications is not compiling, running as it is. Moved to Express 4 but the code is still express 3. See https://github.com/expressjs/express/wiki/Migrating-from-3.x-to-4.x.
  • the run command is not working as it is because of arbitrary user issue with the container used. a quick workaround is to set the env variable HOME to /projects. In the run command in devfile.yaml for instance: export HOME=/projects/ ; cd ...
  • after having disabled some feature, I have the app that is partially working.
  • maybe the easier fix is to fork and have a branch to the changeset before the express upgrade

@sunix
Copy link
Contributor

sunix commented Dec 8, 2020

in the PR redhat-developer/devfile#67 I have reset the project to be clone to the commitid before it breaks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/samples kind/bug Outline of a bug - must adhere to the bug report template. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. severity/P2 Has a minor but important impact to the usage or development of the system.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants