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

Generated Hello World plugin build fails #14028

Closed
mmorhun opened this issue Jul 25, 2019 · 5 comments · Fixed by eclipse-theia/theia#5818
Closed

Generated Hello World plugin build fails #14028

mmorhun opened this issue Jul 25, 2019 · 5 comments · Fixed by eclipse-theia/theia#5818
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/P2 Has a minor but important impact to the usage or development of the system. status/in-progress This issue has been taken by an engineer and is under active development.
Milestone

Comments

@mmorhun
Copy link
Contributor

mmorhun commented Jul 25, 2019

Describe the bug

Generated backend Hello World plugin cannot be build with yarn command by default

Che version

Che master: nightly
Che Theia: 7.0.0-rc-3.0

Steps to reproduce

  1. Create a workspace with Che Theia as IDE
  2. Generate backend Hello World plugin using Yeoman Wizard command
  3. Open terminal in dev container (eclipse/che-theia-dev:next), go to the plugin root and execute yarn command to build it
  4. Build fails with error:
Build log
(theia-dev@container) (/projects/test1) $ yarn
yarn install v1.16.0
warning package.json: License should be a valid SPDX license expression
warning test1@0.0.1: License should be a valid SPDX license expression
[1/5] Validating package.json...
warning test1@0.0.1: License should be a valid SPDX license expression
warning test1@0.0.1: The engine "theiaPlugin" appears to be invalid.
[2/5] Resolving packages...
success Already up-to-date.
$ yarn run clean && yarn run build
yarn run v1.16.0
warning package.json: License should be a valid SPDX license expression
warning test1@0.0.1: The engine "theiaPlugin" appears to be invalid.
$ rimraf lib
Done in 0.15s.
yarn run v1.16.0
warning package.json: License should be a valid SPDX license expression
warning test1@0.0.1: The engine "theiaPlugin" appears to be invalid.
$ yarn run format-code && yarn run compile && theia:plugin pack
warning package.json: License should be a valid SPDX license expression
warning test1@0.0.1: The engine "theiaPlugin" appears to be invalid.
$ tsfmt -r
warning package.json: License should be a valid SPDX license expression
warning test1@0.0.1: The engine "theiaPlugin" appears to be invalid.
$ tsc
node_modules/@theia/plugin/src/theia.d.ts:8157:19 - error TS2304: Cannot find name 'Comment'.

8157         comments: Comment[];
                       ~~~~~~~


node_modules/@theia/plugin/src/theia.d.ts:8312:80 - error TS2304: Cannot find name 'Comment'.

8312         createCommentThread(id: string, resource: Uri, range: Range, comments: Comment[]): CommentThread;
                                                                                    ~~~~~~~


error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

Expected behavior

Build should be successful

Runtime

minishift v1.34.1+c2ff9cb
oc v3.11.0+0cbc58b

Installation method

chectl

Environment

Linux

Additional context

If add skipLibCheck: true into tsconfig.json everything works as expected.

@mmorhun mmorhun added kind/bug Outline of a bug - must adhere to the bug report template. team/ide2 area/editor/theia Issues related to the che-theia IDE of Che labels Jul 25, 2019
@mmorhun mmorhun changed the title Generated Hello Worlds plugin build fails Generated Hello World plugin build fails Jul 25, 2019
@tsmaeder
Copy link
Contributor

@mmorhun any idea why it fails to build?

@tsmaeder tsmaeder added this to the 7.0.0 milestone Jul 25, 2019
@tsmaeder tsmaeder added the severity/P2 Has a minor but important impact to the usage or development of the system. label Jul 25, 2019
@tsmaeder
Copy link
Contributor

Tagging this p2/7.0, since we can't really break che if we fix it.

@mmorhun
Copy link
Contributor Author

mmorhun commented Jul 26, 2019

@tsmaeder I don't know exact reason of it. Some time ago it worked. I think the start point is skopLibCheck flag. Anyway, it needs to be investigated.

@benoitf
Copy link
Contributor

benoitf commented Jul 29, 2019

@mmorhun what is the version of theia used in the generated package.json ?

@mmorhun
Copy link
Contributor Author

mmorhun commented Jul 29, 2019

Generated package.josn
{
      "name": "test1",
      "publisher": "theia",
      "keywords": [
        "theia-plugin"
      ],
      "version": "0.0.1",
      "license": "none",
      
      "files": [
        "src"
      ],
      "devDependencies": {
        "@theia/plugin": "next",
        "@theia/plugin-packager": "latest",
        "rimraf": "2.6.2",
        "typescript-formatter": "7.2.2",
        "typescript": "2.9.2"
      },
      "scripts": {
        "prepare": "yarn run clean && yarn run build",
        "clean": "rimraf lib",
        "format-code": "tsfmt -r",
        "watch": "tsc -watch",
        "compile": "tsc", 
        "build": "yarn run format-code && yarn run compile && theia:plugin pack"
      },
      "engines": {
        "theiaPlugin": "next"
      },
      "theiaPlugin": {
            "backend": "lib/test1-backend.js"
      }
}

@akurinnoy akurinnoy self-assigned this Jul 30, 2019
@akurinnoy akurinnoy added the status/in-progress This issue has been taken by an engineer and is under active development. label Jul 30, 2019
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/P2 Has a minor but important impact to the usage or development of the system. status/in-progress This issue has been taken by an engineer and is under active development.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants