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

che-theia-all.devfile.yaml fails when running build ... DEV che-theia #16413

Closed
3 of 23 tasks
tomgeorge opened this issue Mar 20, 2020 · 10 comments · Fixed by eclipse-che/che-theia#783
Closed
3 of 23 tasks
Assignees
Labels
area/editor/theia Issues related to the che-theia IDE of Che kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system.
Milestone

Comments

@tomgeorge
Copy link
Contributor

Describe the bug

  1. Create a new workspace
  2. import devfile https://raw.githubusercontent.com/eclipse/che-theia/master/devfiles/che-theia-all.devfile.yaml
  3. When the workspace starts, run init ... DEV che-theia
  4. run build ... DEV che-theia

The build step will fail at the yarn step in build.

Che version

  • latest
  • nightly
  • other: 7.9.1 che.openshift.io

Steps to reproduce

  1. Create a new workspace
  2. import devfile https://raw.githubusercontent.com/eclipse/che-theia/master/devfiles/che-theia-all.devfile.yaml
  3. When the workspace starts, run init ... DEV che-theia
  4. run build ... DEV che-theia

Expected behavior

che-theia should build

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: Hosted Che

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: please specify

Eclipse Che Logs

Additional context

@tomgeorge tomgeorge added the kind/bug Outline of a bug - must adhere to the bug report template. label Mar 20, 2020
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Mar 20, 2020
@ibuziuk ibuziuk added severity/P2 Has a minor but important impact to the usage or development of the system. area/editor/theia Issues related to the che-theia IDE of Che team/editors and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Mar 23, 2020
@ibuziuk
Copy link
Member

ibuziuk commented Mar 23, 2020

@vitaliy-guliy I know eclipse-che/che-theia#627 is merged now. Could you please take a look at this issue (I suspect that this could have been already addressed)

@vitaliy-guliy
Copy link
Contributor

@ibuziuk yes, I will take a look and fix the build command if it's necessary.

@tomgeorge
Copy link
Contributor Author

Is there any update on this? It is still not building for me with https://raw.githubusercontent.com/eclipse/che-theia/master/devfiles/che-theia-all.devfile.yaml

@eclipse-che/theia-logging: error Command failed with exit code 2.
lerna ERR! execute callback with error
lerna ERR! Error: Command failed: yarn run lint
lerna ERR! 
lerna ERR! Oops! Something went wrong! :(
lerna ERR! 
lerna ERR! ESLint: 6.8.0.
lerna ERR! 
lerna ERR! ESLint couldn't find the plugin "@typescript-eslint/eslint-plugin".
lerna ERR! 
lerna ERR! (The package "@typescript-eslint/eslint-plugin" was not found when loaded as a Node module from the directory "/projects/che-theia/extensions/eclipse-che-theia-logging".)
lerna ERR! 
lerna ERR! It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
lerna ERR! 
lerna ERR!     npm install @typescript-eslint/eslint-plugin@latest --save-dev
lerna ERR! 
lerna ERR! The plugin "@typescript-eslint/eslint-plugin" was referenced from the config file in "../../.eslintrc.js » ./configs/eslint.json » ./eslint.che-theia.json".
lerna ERR! 
lerna ERR! If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team.
lerna ERR! 
lerna ERR! error Command failed with exit code 2.
lerna ERR! 
lerna ERR! $ eslint --cache=true --no-error-on-unmatched-pattern=true "{src,test}/**/*.{ts,tsx}"
lerna ERR! info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
lerna ERR! 
lerna ERR!     at Promise.all.then.arr (/projects/theia/node_modules/execa/index.js:236:11)
lerna WARN complete Waiting for 3 child processes to exit. CTRL-C to exit immediately.
{ Error: Command failed: yarn run lint

Oops! Something went wrong! :(

ESLint: 6.8.0.

ESLint couldn't find the plugin "@typescript-eslint/eslint-plugin".

(The package "@typescript-eslint/eslint-plugin" was not found when loaded as a Node module from the directory "/projects/che-theia/extensions/eclipse-che-theia-logging".)

It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:

    npm install @typescript-eslint/eslint-plugin@latest --save-dev

The plugin "@typescript-eslint/eslint-plugin" was referenced from the config file in "../../.eslintrc.js » ./configs/eslint.json » ./eslint.che-theia.json".

If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team.

error Command failed with exit code 2.

$ eslint --cache=true --no-error-on-unmatched-pattern=true "{src,test}/**/*.{ts,tsx}"
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

    at Promise.all.then.arr (/projects/theia/node_modules/execa/index.js:236:11)
    at process._tickCallback (internal/process/next_tick.js:68:7)
  code: 2,
  killed: false,
  stdout:
   '$ eslint --cache=true --no-error-on-unmatched-pattern=true "{src,test}/**/*.{ts,tsx}"\ninfo Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.\n',
  stderr:
   '\nOops! Something went wrong! :(\n\nESLint: 6.8.0.\n\nESLint couldn\'t find the plugin "@typescript-eslint/eslint-plugin".\n\n(The package "@typescript-eslint/eslint-plugin" was not found when loaded as a Node module from the directory "/projects/che-theia/extensions/eclipse-che-theia-logging".)\n\nIt\'s likely that the plugin isn\'t installed correctly. Try reinstalling by running the following:\n\n    npm install @typescript-eslint/eslint-plugin@latest --save-dev\n\nThe plugin "@typescript-eslint/eslint-plugin" was referenced from the config file in "../../.eslintrc.js » ./configs/eslint.json » ./eslint.che-theia.json".\n\nIf you still can\'t figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team.\n\nerror Command failed with exit code 2.\n',
  failed: true,
  signal: null,
  cmd: 'yarn run lint',
  timedOut: false,
  exitCode: 1 }
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

@vitaliy-guliy
Copy link
Contributor

@tomgeorge I see two issues here:

  1. Sometimes theia does not want to be build when che-thea is not in /projects/theia/che directory. In our case che-theia is cloned to /projects/che-theia. When running init ... DEV che-theia command, the new alias for https://github.com/eclipse/che-theia repository will be created, which will point in on local /projects/che-theia directory.
    But it somehow works when building Che-Theia docker image https://github.com/eclipse/che-theia/blob/master/dockerfiles/theia/Dockerfile#L53
    It's necessary to investigate it in more detail.

But you can try to init che-theia by hands. For that you need to open a terminal in che-dev container and run

$ cd /projects/theia
$ che-theia init
$ yarn

It will clone che-theia to /projects/theia/che/che-theia and build.

  1. After initializing Che-Theia by hands, I was not able to build having another error
lerna ERR! [compile] src/browser/che-task-main.ts(37,55): error TS2345: Argument of type '(event: TaskInfo) => Promise<void>' is not assignable to parameter of type '(e: TaskInfo) => any'.
lerna ERR! [compile]   Types of parameters 'event' and 'e' are incompatible.
lerna ERR! [compile]     Type 'import("/projects/theia/packages/task/lib/common/task-protocol").TaskInfo' is not assignable to type 'import("/projects/theia/che/che-theia/extensions/eclipse-che-theia-plugin/src/che").TaskInfo'.
lerna ERR! [compile]       The types of 'config._scope' are incompatible between these types.
lerna ERR! [compile]         Type 'TaskConfigurationScope' is not assignable to type 'string | undefined'.
lerna ERR! [compile]           Type 'TaskScope.Workspace' is not assignable to type 'string | undefined'.
lerna ERR! [compile] src/browser/che-task-main.ts(38,52): error TS2345: Argument of type '(event: TaskExitedEvent) => Promise<void>' is not assignable to parameter of type '(e: TaskExitedEvent) => any'.
lerna ERR! [compile]   Types of parameters 'event' and 'e' are incompatible.
lerna ERR! [compile]     Type 'import("/projects/theia/packages/task/lib/common/task-protocol").TaskExitedEvent' is not assignable to type 'import("/projects/theia/che/che-theia/extensions/eclipse-che-theia-plugin/src/che").TaskExitedEvent'.
lerna ERR! [compile]       Types of property 'config' are incompatible.
lerna ERR! [compile]         Type 'import("/projects/theia/packages/task/lib/common/task-protocol").TaskConfiguration | undefined' is not assignable to type 'import("/projects/theia/che/che-theia/extensions/eclipse-che-theia-plugin/src/che").TaskConfiguration | undefined'.
lerna ERR! [compile]           Type 'import("/projects/theia/packages/task/lib/common/task-protocol").TaskConfiguration' is not assignable to type 'import("/projects/theia/che/che-theia/extensions/eclipse-che-theia-plugin/src/che").TaskConfiguration'.
lerna ERR! [compile] src/browser/task-config-service.ts(52,13): error TS2322: Type '{ taskId: number; widgetOptions: { area: "bottom"; }; mode: WidgetOpenMode; taskInfo: TaskInfo | undefined; }' is not assignable to type 'TaskTerminalWidgetOpenerOptions'.
lerna ERR! [compile]   Object literal may only specify known properties, and 'taskId' does not exist in type 'TaskTerminalWidgetOpenerOptions'.
lerna ERR! [compile] src/node/che-task-service.ts(42,55): error TS2345: Argument of type 'import("/projects/theia/packages/task/lib/common/task-protocol").TaskConfiguration' is not assignable to parameter of type 'import("/projects/theia/che/che-theia/extensions/eclipse-che-theia-plugin/src/che").TaskConfiguration'.
lerna ERR! [compile] src/node/che-task-service.ts(43,94): error TS2322: Type 'import("/projects/theia/che/che-theia/extensions/eclipse-che-theia-plugin/src/che").TaskInfo' is not assignable to type 'import("/projects/theia/packages/task/lib/common/task-protocol").TaskInfo'.
lerna ERR! [compile]   The types of 'config._scope' are incompatible between these types.
lerna ERR! [compile]     Type 'string | undefined' is not assignable to type 'TaskConfigurationScope'.
lerna ERR! [compile]       Type 'undefined' is not assignable to type 'TaskConfigurationScope'.
lerna ERR! [compile] src/node/che-task-service.ts(47,17): error TS2322: Type 'CheTask' is not assignable to type 'Task'.
lerna ERR! [compile]   Types of property 'fireTaskExited' are incompatible.
lerna ERR! [compile]     Type '(event: import("/projects/theia/che/che-theia/extensions/eclipse-che-theia-plugin/src/che").TaskExitedEvent) => void' is not assignable to type '(event: import("/projects/theia/packages/task/lib/common/task-protocol").TaskExitedEvent) => void'.
lerna ERR! [compile] src/node/che-task-service.ts(115,56): error TS2345: Argument of type 'import("/projects/theia/packages/task/lib/common/task-protocol").TaskInfo' is not assignable to parameter of type 'import("/projects/theia/che/che-theia/extensions/eclipse-che-theia-plugin/src/che").TaskInfo'.
lerna ERR! [compile] src/node/che-task-service.ts(118,5): error TS2416: Property 'fireTaskExited' in type 'CheTask' is not assignable to the same property in base type 'Task'.
lerna ERR! [compile]   Type '(event: import("/projects/theia/che/che-theia/extensions/eclipse-che-theia-plugin/src/che").TaskExitedEvent) => void' is not assignable to type '(event: import("/projects/theia/packages/task/lib/common/task-protocol").TaskExitedEvent) => void'.
lerna ERR! [compile]     Types of parameters 'event' and 'event' are incompatible.
lerna ERR! [compile]       Type 'import("/projects/theia/packages/task/lib/common/task-protocol").TaskExitedEvent' is not assignable to type 'import("/projects/theia/che/che-theia/extensions/eclipse-che-theia-plugin/src/che").TaskExitedEvent'.
lerna ERR! [compile] error Command failed with exit code 2.
lerna ERR! [compile] info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
lerna ERR! [compile] yarn compile exited with code 2
lerna ERR! info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
lerna ERR! 
lerna ERR!     at Promise.all.then.arr (/projects/theia/node_modules/execa/index.js:236:11)
{ Error: Command failed: yarn run build
error Command failed with exit code 1.

@tomgeorge
Copy link
Contributor Author

@vitaliy-guliy I have seen the same error when trying che-theia init and yarn in a terminal as well.

@tomgeorge
Copy link
Contributor Author

Hi, just checking in to see if there is any update on this?

@vitaliy-guliy
Copy link
Contributor

@tomgeorge You should be able to init Che-Theia with che-theia init and build with yarn.
The devfile is still unchanged, I will try to update it soon.

@azatsarynnyy
Copy link
Member

In some cases, yarn build fails after applying che-theia init with --alias parameter
https://github.com/eclipse/che-theia/blob/4d2f05a57d9263b741d844000718a3100e8d9497/devfiles/che-theia-all.devfile.yaml#L55

The workaround is to call che-theia init command in /projects/theia folder.

@azatsarynnyy
Copy link
Member

setting P1 as it's related to dogfooding

@azatsarynnyy azatsarynnyy added severity/P1 Has a major impact to usage or development of the system. and removed severity/P2 Has a minor but important impact to the usage or development of the system. labels Jun 24, 2020
@azatsarynnyy azatsarynnyy added this to the 7.16 milestone Jun 24, 2020
@azatsarynnyy azatsarynnyy mentioned this issue Jun 25, 2020
20 tasks
@azatsarynnyy azatsarynnyy self-assigned this Jul 1, 2020
@azatsarynnyy azatsarynnyy added the status/in-progress This issue has been taken by an engineer and is under active development. label Jul 1, 2020
@azatsarynnyy azatsarynnyy removed the status/in-progress This issue has been taken by an engineer and is under active development. label Jul 1, 2020
@azatsarynnyy
Copy link
Member

I've removed --alias for che-theia init in che-theia-all.devfile.yaml
Looks like yarn doesn't work correctly with the sources placed in the folders of the same level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/editor/theia Issues related to the che-theia IDE of Che kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants