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 > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
warning @theia/callhierarchy > @theia/core > react-virtualized > babel-runtime > [email protected]: 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 > [email protected]: cross-spawn no longer requires a build toolchain, use it instead
warning @theia/git > @theia/scm > @types/[email protected]: 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 > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
warning @theia/plugin-ext-vscode > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
warning @theia/plugin-ext-vscode > @theia/plugin-ext > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
warning @theia/plugin-ext-vscode > @theia/plugin-ext > @theia/debug > @types/[email protected]: 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 > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
warning @theia/cli > @theia/application-manager > electron-rebuild > node-gyp > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
warning @theia/cli > @theia/application-manager > webpack-cli > webpack-addons > jscodeshift > recast > [email protected]: 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 > [email protected]: 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 > [email protected]: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning @theia/cli > @theia/application-manager > webpack-cli > jscodeshift > [email protected]: 🙌 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 > [email protected]: 🙌 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 > [email protected]: 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 > [email protected]: Package no longer supported. Contact [email protected] for more info.
warning @theia/cli > @theia/application-manager > webpack-cli > webpack-addons > jscodeshift > [email protected]: Package no longer supported. Contact [email protected] for more info.
warning @theia/cli > @theia/application-manager > css-loader > cssnano > postcss-merge-rules > caniuse-api > [email protected]: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
[2/4] Fetching packages...
warning [email protected]: The engine "vscode" appears to be invalid.
warning [email protected]: The engine "vscode" appears to be invalid.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "@theia/git > @theia/scm > [email protected]" has unmet peer dependency "react@^0.14.0 || ^15.0.0 || ^16.0.0".
warning "@theia/git > @theia/scm > [email protected]" has unmet peer dependency "react-dom@^0.14.0 || ^15.0.0 || ^16.0.0".
warning "@theia/messages > [email protected]" has unmet peer dependency "react@>=16.3.3".
warning "@theia/messages > [email protected]" has unmet peer dependency "react-dom@>=16.3.3".
warning "@theia/cli > [email protected]" has unmet peer dependency "request@2.*.*".
warning "@theia/cli > @theia/application-manager > [email protected]" has unmet peer dependency "font-awesome@>=4.3.0".
warning "@theia/cli > @theia/application-manager > font-awesome-webpack > [email protected]" 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 [email protected]
gyp info using [email protected] | 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
-->
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:
@kharazit which steps were you explicitly following?
@kharazit which step or at what point did it fail for you?
The $yarn step, I get the above errors, the errors for that can be found at https://github.com/eclipse-theia/theia/issues/5184
The
$yarnstep, I get the above errors
I see you've updated the description so it's clearer thank you.
Have you satisfied the prerequisites?
Yes
Yes
Please try (as described in https://github.com/eclipse-theia/theia/issues/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).
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.
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.
Awesome. I will know where to look to point myself and others when we get stuck. I appreciate it!