eclipse-che / che

Kubernetes based Cloud Development Environments for Enterprise Teams
http://eclipse.org/che
Eclipse Public License 2.0
6.98k stars 1.19k forks source link

Che Theia build failing with the latest stable yarn #15552

Closed azatsarynnyy closed 4 years ago

azatsarynnyy commented 4 years ago

Describe the bug

Che Theia build failing with the latest stable yarn - 1.21.1

Steps to reproduce

Remove node_modules folder and build Che Theia with yarn.

The build is failed with several messages, like: warning package.json: Invalid bin entry for "che:theia" (in "@eclipse-che/theia-generator") or /bin/sh: theia:plugin: command not found

Looks like there's some issue with creating symlinks in node_modules folder.

benoitf commented 4 years ago

hello, src/browser/textmate/monaco-textmate-service.ts is an upstream issue no ?

azatsarynnyy commented 4 years ago

@benoitf I don't know. I'm going to figure it out

tolusha commented 4 years ago

sounds blocker?

benoitf commented 4 years ago

I'm not sure it's blocker as you can use a previous version of yarn (and end users are not impacted AFAIK) I would say mostly P1 It may be blocker only if CI is blocked

azatsarynnyy commented 4 years ago

... is an upstream issue no?

@benoitf sorry, I attached the wrong output. The description is updated.

vzhukovs commented 4 years ago

Got error on different module build:

...
@eclipse-che/theia-terminal: [format] yarn format exited with code 0
@eclipse-che/theia-plugin-ext: [format] yarn format exited with code 0
@eclipse-che/theia-factory-plugin: [format] yarn format exited with code 0
@eclipse-che/theia-activity-tracker: [compile] yarn compile exited with code 0
@eclipse-che/theia-containers-plugin: [compile] yarn compile exited with code 0
@eclipse-che/theia-containers-plugin: [lint] yarn lint exited with code 0
@eclipse-che/theia-containers-plugin: /bin/sh: theia:plugin: command not found
@eclipse-che/theia-containers-plugin: error Command failed with exit code 127.
@eclipse-che/theia-containers-plugin: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
@eclipse-che/theia-activity-tracker: [lint] yarn lint exited with code 0
@eclipse-che/theia-containers-plugin: error Command failed with exit code 127.
@eclipse-che/theia-containers-plugin: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
@eclipse-che/theia-activity-tracker: Done in 21.82s.
lerna ERR! yarn run prepare exited 127 in '@eclipse-che/theia-containers-plugin'
lerna WARN complete Waiting for 8 child processes to exit. CTRL-C to exit immediately.
error Command failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
vlad@MacBook-Pro-15-Vlad che-theia %
monaka commented 4 years ago

Same here. Looks it's similar to #14145.

I found theia:plugin in node_modules/.bin/ on my workspace but it wasn't. Only theia-plugin is available.

ls node_modules/.bin/ ``` acorn is-ci regjsparser atob jest rimraf babylon jest-runtime sane concurrent jsesc seek-bunzip concurrently json2yaml seek-table conventional-changelog-writer json2yml semver conventional-commits-parser json5 sha.js conventional-recommended-bump JSONStream sl-log-transformer cpx jsontoyaml sshpk-conv detect-libc jsontoyml sshpk-sign download-debug-adapters js-yaml sshpk-verify editorconfig lerna strip-indent errno loose-envify terser escodegen markdown-it theia-plugin esgenerate miller-rabin tree-kill esparse mime tsc esvalidate mkdirp tsfmt fuse mustache tslint get-pkg-repo ncp tsserver git-raw-commits nexe uglifyjs git-semver-tags node-gyp uuid handlebars nodetouch vscode-json-languageserver he nopt watch html-minifier prebuild-install webpack import-local-fixture ps-tree webpack-cli installServerIntoExtension rc which ```

My workspace is on Debian GNU/Linux 9.11.

If my thought is reasonable, theia:plugin is just kept as it for the backward compatibility. And theia:plugin won't run at least on Windows. (And in my case, also Linux.)

We can upgrade it to theia-plugin now, right ?

TheRealChssAddct commented 4 years ago

Just an FYI @azatsarynnyy -- the breaking change in yarn 1.21.1 was due to added bin key validation among other things which disallowed colons in the bin key name. The fact of the change being too restrictive has been discussed here: https://github.com/yarnpkg/yarn/pull/7811 and here is a pull request to relax the validation, but only for dots not for colons: https://github.com/yarnpkg/yarn/pull/7755

Though they have backed off some on the restrictive (allowing dots) it appears they will NOT be modifying the validation to allow colons, so all usage of theia:plugin and any other symlinks using colons should be changed. (plus, as mentioned, colons in symlinks wouldn't work in Windows anyways).

TheRealChssAddct commented 4 years ago

I see that the commit fixes to use theia-plugin instead theia:plugin. However, there remains the issue of che:theia (https://github.com/eclipse/che-theia/blob/master/generator/package.json). All usage should be modified to che-theia.
Che:theia is used in DockerFiles (e.g https://github.com/eclipse/che-theia/blob/master/dockerfiles/theia/Dockerfile) and devfiles (e.g. https://github.com/eclipse/che-theia/blob/master/devfiles/che-theia-all.devfile.yaml)

azatsarynnyy commented 4 years ago

Hello @TheRealChssAddct Thanks for the detailed explanation. We will tackle it. cc/ @vzhukovskii

vzhukovs commented 4 years ago

Hello @TheRealChssAddct, thanks for your feedback! cc @azatsarynnyy created the following issue: https://github.com/eclipse/che/issues/15771 to track yarn upgrade through the all projects which need these changes.