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

documentation: missing prerequisite causes build failure #7255

Closed
kharazit opened this issue Mar 2, 2020 · 10 comments
Closed

documentation: missing prerequisite causes build failure #7255

kharazit opened this issue Mar 2, 2020 · 10 comments
Labels
documentation issues related to documentation question user / developer questions

Comments

@kharazit
Copy link

kharazit commented Mar 2, 2020

Description

The process of installing theia is horrible. I have been working for hours to get a working install of the software to no avail. Earlier, I had a working docker image, but for some reason I didn't have a full terminal, nor access to the entire filesystem. I have never had so much trouble trying to install an IDE/editor in my life. It is unfortunately my only other option for a web hosted ide.

Trying to correct the docker/terminal issue I decided to have another go at install theia from source. Beginning from the documentation, and following the directions exactly leads to failed builds. Can someone please work out a more complete documentaion? I have been surrounded by issues regarding npm, node, yarn, etc, which is all black magic for us outside of the javascript universe.

The current error I am dealing with is the following:

cades@kharazi-cades-dev:~/theia$ nano package.json
cades@kharazi-cades-dev:~/theia$ yarn
yarn install v1.22.0
info No lockfile found.
[1/4] Resolving packages...
warning @theia/callhierarchy > @theia/languages > @theia/application-package > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
warning @theia/callhierarchy > @theia/core > react-virtualized > babel-runtime > core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
warning @theia/callhierarchy > @theia/monaco > @theia/filesystem > trash > xdg-trashdir > @sindresorhus/df > execa > cross-spawn-async@2.2.5: cross-spawn no longer requires a build toolchain, use it instead
warning @theia/git > @theia/scm > @types/p-debounce@1.0.1: This is a stub types definition. p-debounce provides its own type definitions, so you do not need this installed.
warning @theia/git > dugite-extra > dugite-no-gpl > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
warning @theia/plugin-ext-vscode > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
warning @theia/plugin-ext-vscode > @theia/plugin-ext > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
warning @theia/plugin-ext-vscode > @theia/plugin-ext > @theia/debug > @types/p-debounce@1.0.1: This is a stub types definition. p-debounce provides its own type definitions, so you do not need this installed.
warning @theia/cli > @theia/application-manager > less > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
warning @theia/cli > @theia/application-manager > electron-rebuild > node-gyp > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
warning @theia/cli > @theia/application-manager > webpack-cli > webpack-addons > jscodeshift > recast > core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
warning @theia/cli > @theia/application-manager > css-loader > cssnano > autoprefixer > browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning @theia/cli > @theia/application-manager > css-loader > cssnano > postcss-merge-rules > browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning @theia/cli > @theia/application-manager > webpack-cli > jscodeshift > babel-preset-es2015@6.24.1: 🙌  Thanks for using Babel: we recommend using babel-preset-env now: please read https://babeljs.io/env to update!
warning @theia/cli > @theia/application-manager > webpack-cli > webpack-addons > jscodeshift > babel-preset-es2015@6.24.1: 🙌  Thanks for using Babel: we recommend using babel-preset-env now: please read https://babeljs.io/env to update!
warning @theia/cli > @theia/application-manager > webpack-cli > jscodeshift > babel-register > core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
warning @theia/cli > @theia/application-manager > webpack-cli > jscodeshift > nomnom@1.8.1: Package no longer supported. Contact support@npmjs.com for more info.
warning @theia/cli > @theia/application-manager > webpack-cli > webpack-addons > jscodeshift > nomnom@1.8.1: Package no longer supported. Contact support@npmjs.com for more info.
warning @theia/cli > @theia/application-manager > css-loader > cssnano > postcss-merge-rules > caniuse-api > browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
[2/4] Fetching packages...
warning monaco-languageclient@0.10.2: The engine "vscode" appears to be invalid.
warning vscode-languageclient@5.3.0-next.9: The engine "vscode" appears to be invalid.
info fsevents@2.1.2: The platform "linux" is incompatible with this module.
info "fsevents@2.1.2" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents@1.2.11: The platform "linux" is incompatible with this module.
info "fsevents@1.2.11" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "@theia/git > @theia/scm > react-autosize-textarea@7.0.0" has unmet peer dependency "react@^0.14.0 || ^15.0.0 || ^16.0.0".
warning "@theia/git > @theia/scm > react-autosize-textarea@7.0.0" has unmet peer dependency "react-dom@^0.14.0 || ^15.0.0 || ^16.0.0".
warning "@theia/messages > react-perfect-scrollbar@1.5.8" has unmet peer dependency "react@>=16.3.3".
warning "@theia/messages > react-perfect-scrollbar@1.5.8" has unmet peer dependency "react-dom@>=16.3.3".
warning "@theia/cli > requestretry@3.1.0" has unmet peer dependency "request@2.*.*".
warning "@theia/cli > @theia/application-manager > font-awesome-webpack@0.0.5-beta.2" has unmet peer dependency "font-awesome@>=4.3.0".
warning "@theia/cli > @theia/application-manager > font-awesome-webpack > less-loader@2.2.3" has incorrect peer dependency "less@^2.3.1".
warning Workspaces can only be enabled in private projects.
[4/4] Building fresh packages...
[1/9] ⠠ nsfw
[6/9] ⠠ vscode-ripgrep
[3/9] ⠠ @theia/node-pty
[4/9] ⠠ drivelist
error /home/cades/theia/node_modules/nsfw: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: /home/cades/theia/node_modules/nsfw
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@5.0.5
gyp info using node@10.19.0 | linux | x64
gyp info find Python using Python version 2.7.17 found at "/usr/bin/python"
gyp info spawn /usr/bin/python
gyp info spawn args [ '/home/cades/.nvm/versions/node/v10.19.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/home/cades/theia/node_modules/nsfw/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/cades/.nvm/versions/node/v10.19.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/cades/.cache/node-gyp/10.19.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/home/cades/.cache/node-gyp/10.19.0',
gyp info spawn args   '-Dnode_gyp_dir=/home/cades/.nvm/versions/node/v10.19.0/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/home/cades/.cache/node-gyp/10.19.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/home/cades/theia/node_modules/nsfw',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/home/cades/theia/node_modules/nsfw/build'
  CXX(target) Release/obj.target/nsfw/src/NSFW.o
make: g++: Command not found
nsfw.target.mk:120: recipe for target 'Release/obj.target/nsfw/src/NSFW.o' failed
make: *** [Release/obj.target/nsfw/src/NSFW.o] Error 127
make: Leaving directory '/home/cades/theia/node_modules/nsfw/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/cades/.nvm/versions/node/v10.19.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:191:23)
gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 4.15.0-74-generic
gyp ERR! command "/home/cades/.nvm/versions/node/v10.19.0/bin/node" "/home/cades/.nvm/versions/node/v10.19.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/cades/theia/node_modules/nsfw

-->

Reproduction Steps

To recreate this issue just try and install from ubuntu following the exact steps in the git. It won't work, promise.

OS and Theia version:
Ubuntu 18.03
Theia latest

Diagnostics:

@vince-fugnitto
Copy link
Member

@kharazit which steps were you explicitly following?

@kharazit
Copy link
Author

kharazit commented Mar 2, 2020

@vince-fugnitto
Copy link
Member

https://theia-ide.org/docs/composing_applications

@kharazit which step or at what point did it fail for you?

@kharazit
Copy link
Author

kharazit commented Mar 2, 2020

The $yarn step, I get the above errors, the errors for that can be found at #5184

@vince-fugnitto
Copy link
Member

The $yarn step, I get the above errors

I see you've updated the description so it's clearer thank you.
Have you satisfied the prerequisites?

@vince-fugnitto vince-fugnitto added documentation issues related to documentation question user / developer questions labels Mar 2, 2020
@kharazit
Copy link
Author

kharazit commented Mar 2, 2020

Yes

@vince-fugnitto
Copy link
Member

vince-fugnitto commented Mar 2, 2020

Yes

Please try (as described in #2174):

sudo apt-get install build-essential

Update:

If the command works for you I will update the prerequisites (it looks like it might have been missed last time around).

@kharazit
Copy link
Author

kharazit commented Mar 2, 2020

Okay. That seemed to work. I suppose it's pretty normal to assume people have that installed, haha. Thank you.

However, I still feel the documentation could be improved. The documentation could be centralized into one location, common build errors, etc. Because I am clearly not the only struggling to figure out how to get this to work.

@vince-fugnitto
Copy link
Member

Okay. That seemed to work. I suppose it's pretty normal to assume people have that installed, haha. Thank you.

However, I still feel the documentation could be improved. The documentation could be centralized into one location, common build errors, etc. Because I am clearly not the only struggling to figure out how to get this to work.

I'll update the prerequisites docs :) glad it worked for you.
Thank you for your contribution, and sorry for the frustration. We are currently in the process of updating documentation so please bear with us. The main source of documentation is this repo itself, the website needs to be updated.

@kharazit
Copy link
Author

kharazit commented Mar 2, 2020

Awesome. I will know where to look to point myself and others when we get stuck. I appreciate it!

@vince-fugnitto vince-fugnitto changed the title installing theia is horrible, better documentation is needed documentation: missing prerequisite causes build failure Mar 2, 2020
@kharazit kharazit closed this as completed Mar 2, 2020
vince-fugnitto added a commit that referenced this issue Mar 2, 2020
The following commit updates the `prerequisites` for Linux
to include `sudo apt-get install build-essential`.

The change was first described in the following comment #2174 (comment)
but was never included. It was also useful in resolving the issue #7255.

Signed-off-by: vince-fugnitto <vincent.fugnitto@ericsson.com>
vince-fugnitto added a commit that referenced this issue Mar 3, 2020
The following commit updates the `prerequisites` for Linux
to include `sudo apt-get install build-essential`.

The change was first described in the following comment #2174 (comment)
but was never included. It was also useful in resolving the issue #7255.

Signed-off-by: vince-fugnitto <vincent.fugnitto@ericsson.com>
JesterOrNot pushed a commit to JesterOrNot/theia that referenced this issue Mar 12, 2020
The following commit updates the `prerequisites` for Linux
to include `sudo apt-get install build-essential`.

The change was first described in the following comment eclipse-theia#2174 (comment)
but was never included. It was also useful in resolving the issue eclipse-theia#7255.

Signed-off-by: vince-fugnitto <vincent.fugnitto@ericsson.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation issues related to documentation question user / developer questions
Projects
None yet
Development

No branches or pull requests

2 participants