Theia-xtext-sprotty-example yarn error, anybody yarn succeed?

theia-xtext-sprotty-example is a good theia IDE! But yarn error, anybody yarn succeed?

[original thread by xinsuinizhuan]

I’ve just run it in Gitpod and it works fine.

Here what it does: https://github.com/TypeFox/theia-xtext-sprotty-example/blob/master/.gitpod.yml

What kind of yarn error do you get?

[xinsuinizhuan]

below is my error,what shoud i do?

[xinsuinizhuan]

D:\Eclipse\eclipse_theia\src_run\theia-xtext-sprotty-example-master\theia>yarn
yarn install v1.7.0
[1/4] Resolving packages…
success Already up-to-date.
$ lerna run prepare
lerna info version 2.4.0
states-sprotty: > states-sprotty@0.0.0 prepare D:\Eclipse\eclipse_theia\src_run\theia-xtext-sprotty-example-master\theia\states-sprotty
states-sprotty: > yarn run clean && yarn run build
states-sprotty: yarn run v1.7.0
states-sprotty: warning package.json: No license field
states-sprotty: $ rimraf lib
states-sprotty: Done in 0.26s.
states-sprotty: yarn run v1.7.0
states-sprotty: warning package.json: No license field
states-sprotty: $ tsc
states-sprotty: Done in 2.29s.
states-dsl: > states-dsl@0.0.0 prepare D:\Eclipse\eclipse_theia\src_run\theia-xtext-sprotty-example-master\theia\states-dsl
states-dsl: > yarn run clean && yarn install:languageserver && yarn run build
states-dsl: yarn run v1.7.0
states-dsl: warning package.json: No license field
states-dsl: $ rimraf lib
states-dsl: Done in 0.28s.
states-dsl: yarn run v1.7.0
states-dsl: warning package.json: No license field
states-dsl: $ rimraf -rf ./build && mkdir build && yarn copy:languageserver && yarn unzip:languageserver
states-dsl: warning package.json: No license field
states-dsl: $ cp …/…/language-server/io.typefox.examples.theia.states.ide/build/distributions/states-language-server.zip .
states-dsl: ‘cp’ �����ڲ����ⲿ���Ҳ���ǿ����еij���
states-dsl: ���������ļ���
states-dsl: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
states-dsl: error Command failed with exit code 1.
states-dsl: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
states-dsl: error Command failed with exit code 1.
states-dsl: npm ERR! code ELIFECYCLE
states-dsl: npm ERR! errno 1
states-dsl: npm ERR! states-dsl@0.0.0 prepare: yarn run clean && yarn install:languageserver && yarn run build
states-dsl: npm ERR! Exit status 1
states-dsl: npm ERR!
states-dsl: npm ERR! Failed at the states-dsl@0.0.0 prepare script.
states-dsl: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
states-dsl: npm ERR! A complete log of this run can be found in:
states-dsl: npm ERR! C:\Users\lllstandout\AppData\Roaming\npm-cache_logs\2019-07-01T08_12_34_892Z-debug.log
lerna ERR! execute callback with error
lerna ERR! Error: Command failed: npm run prepare
lerna ERR! warning package.json: No license field
lerna ERR! warning package.json: No license field
lerna ERR! warning package.json: No license field
lerna ERR! ‘cp’ �����ڲ����ⲿ���Ҳ���ǿ����еij���
lerna ERR! ���������ļ���
lerna ERR! error Command failed with exit code 1.
lerna ERR! error Command failed with exit code 1.
lerna ERR! npm ERR! code ELIFECYCLE
lerna ERR! npm ERR! errno 1
lerna ERR! npm ERR! states-dsl@0.0.0 prepare: yarn run clean && yarn install:languageserver && yarn run build
lerna ERR! npm ERR! Exit status 1
lerna ERR! npm ERR!
lerna ERR! npm ERR! Failed at the states-dsl@0.0.0 prepare script.
lerna ERR! npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
lerna ERR!
lerna ERR! npm ERR! A complete log of this run can be found in:
lerna ERR! npm ERR! C:\Users\lllstandout\AppData\Roaming\npm-cache_logs\2019-07-01T08_12_34_892Z-debug.log
lerna ERR!
lerna ERR!
lerna ERR! > states-dsl@0.0.0 prepare D:\Eclipse\eclipse_theia\src_run\theia-xtext-sprotty-example-master\theia\states-dsl
lerna ERR! > yarn run clean && yarn install:languageserver && yarn run build
lerna ERR!
lerna ERR! yarn run v1.7.0
lerna ERR! $ rimraf lib
lerna ERR! Done in 0.28s.
lerna ERR! yarn run v1.7.0
lerna ERR! $ rimraf -rf ./build && mkdir build && yarn copy:languageserver && yarn unzip:languageserver
lerna ERR! $ cp …/…/language-server/io.typefox.examples.theia.states.ide/build/distributions/states-language-server.zip .
lerna ERR! info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
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 (D:\Eclipse\eclipse_theia\src_run\theia-xtext-sprotty-example-master\theia\node_modules\lerna\node_modules\execa\index.js:236:11)
(node:7908) UnhandledPromiseRejectionWarning: Error: Command failed: npm run prepare
warning package.json: No license field
warning package.json: No license field
warning package.json: No license field
‘cp’ �����ڲ����ⲿ���Ҳ���ǿ����еij���
�����������ļ���
error Command failed with exit code 1.
error Command failed with exit code 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! states-dsl@0.0.0 prepare: yarn run clean && yarn install:languageserver && yarn run build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the states-dsl@0.0.0 prepare script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\lllstandout\AppData\Roaming\npm-cache_logs\2019-07-01T08_12_34_892Z-debug.log

states-dsl@0.0.0 prepare D:\Eclipse\eclipse_theia\src_run\theia-xtext-sprotty-example-master\theia\states-dsl
yarn run clean && yarn install:languageserver && yarn run build

yarn run v1.7.0
$ rimraf lib
Done in 0.28s.
yarn run v1.7.0
$ rimraf -rf ./build && mkdir build && yarn copy:languageserver && yarn unzip:languageserver
$ cp …/…/language-server/io.typefox.examples.theia.states.ide/build/distributions/states-language-server.zip .
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

at Promise.all.then.arr (D:\Eclipse\eclipse_theia\src_run\theia-xtext-sprotty-example-master\theia\node_modules\lerna\node_modules\execa\index.js:236:11)
at process._tickCallback (internal/process/next_tick.js:68:7)

(node:7908) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4)
(node:7908) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

[xinsuinizhuan]

I run it in windows10? And run as the followed operation: cd language-server &&
./gradlew build &&
cd …/theia &&
yarn &&

[xinsuinizhuan]

@anton-kosyakov

[Miro Spönemann]

You are trying to build on Windows, but the package script uses the cp command, which is not available in your terminal. Please create an issue in the theia-xtext-sprotty-example repository. This is unrelated to Theia.

[Ryan Dunn]

This is fixed by either using a bash shell or by adding ‘%ProgramFiles%\Git\usr\bin’ to your Windows Path.

@spoenemann, I could not assign you for the review via GH: https://github.com/TypeFox/theia-xtext-sprotty-example/pull/10

[xinsuinizhuan]

I set ‘%ProgramFiles%\Git\usr\bin’, and run the common:npm npm install --global --production windows-build-tools.but it sstill error. in windows。 hou could i do?

Can you try with git clone --single-branch -b next-theia-672b697b https://github.com/kittaakos/theia-xtext-sprotty-example?

Obsolete, try with https://github.com/TypeFox/theia-xtext-sprotty-example.

[xinsuinizhuan]

@kittaakos ic behavior, skipping.
[----------------------------------------------------------------------] 0/1352(
node:7656) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security
and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Bu
ffer.from() methods instead.
warning monaco-languageclient@0.9.0: The engine “vscode” appears to be invalid.
warning vscode-base-languageclient@4.4.0: The engine “vscode” appears to be inva
lid.
info fsevents@1.2.4: The platform “win32” is incompatible with this module.
info “fsevents@1.2.4” is an optional dependency and failed compatibility check.
Excluding it from installation.
[3/4] Linking dependencies…
warning “workspace-aggregator-790b66c9-a186-4975-9f3e-3da1abac5ac0 > states-spro
tty > sprotty > snabbdom-virtualize@0.7.0” has incorrect peer dependency “snabbd
om@~0.6.6”.
warning "workspace-aggregator-790b66c9-a186-4975-9f3e-3da1abac5ac0 > browser-app

@theia/cli > @theia/application-manager > font-awesome-webpack@0.0.5-beta.2"
has unmet peer dependency “font-awesome@>=4.3.0”.
warning “workspace-aggregator-790b66c9-a186-4975-9f3e-3da1abac5ac0 > browser-app
@theia/cli > @theia/application-manager > font-awesome-webpack > less-loader@
2.2.3” has incorrect peer dependency “less@^2.3.1”.
[4/4] Building fresh packages…
[-/11] ⠈ waiting…
[11/11] ⠈ @theia/java
[-/11] ⠁ waiting…
[-/11] ⠁ waiting…
error D:\Eclipse\eclipse_theia\src_run\theia-xtext-sprotty-example-master\theia
node_modules@theia\java: Command failed.
Exit code: 1
Command: node ./scripts/download-jdt-ls.js
Arguments:
Directory: D:\Eclipse\eclipse_theia\src_run\theia-xtext-sprotty-example-master\t
heia\node_modules@theia\java

[xinsuinizhuan]

@kittaakos still error!

It failed to download the Java LS for some reason. As a workaround, you can remove the @theia/java from the package.jsons (both browser-app and electron-app) and re-run yarn.

[xinsuinizhuan]

I reset my JDK,then it works normal. Thank you!

:tada: Great, thanks for your feedback!