I decided I wanted to get started in open source code, as an almost beginner. One of the projects that has been suggested to me is vscode. So, I am following the instructions in the following link:
https://github.com/microsoft/vscode/wiki/How-to-Contribute
I am on Fedora as platform, so I run the command for Red hat based linux. It succeded. Then, I forked on my github, i cloned my fork locally, as the rest of the guide suggest. SO, I entred this vscode directory, and run yarn. Here problems started, with the following error:
1/13] ⠂ @parcel/watcher
[2/13] ⠂ @vscode/ripgrep
[3/13] ⠂ @vscode/sqlite3
[4/13] ⠂ keytar
error /home/matteopossamai/open_source/vscode/node_modules/native-is-elevated: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: /home/matteopossamai/open_source/vscode/node_modules/native-is-elevated
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 3.9.7 found at "/usr/bin/python3"
gyp http GET https://electronjs.org/headers/v17.4.3/node-v17.4.3-headers.tar.gz
gyp http 200 https://artifacts.electronjs.org/headers/dist/v17.4.3/node-v17.4.3-headers.tar.gz
gyp http GET https://electronjs.org/headers/v17.4.3/SHASUMS256.txt
gyp http 200 https://artifacts.electronjs.org/headers/dist/v17.4.3/SHASUMS256.txt
gyp info spawn /usr/bin/python3
gyp info spawn args [
gyp info spawn args '/usr/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/matteopossamai/open_source/vscode/node_modules/native-is-elevated/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/matteopossamai/.cache/node-gyp/17.4.3/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/matteopossamai/.cache/node-gyp/17.4.3',
gyp info spawn args '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/home/matteopossamai/.cache/node-gyp/17.4.3/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/home/matteopossamai/open_source/vscode/node_modules/native-is-elevated',
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 args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: ingresso nella directory «/home/matteopossamai/open_source/vscode/node_modules/native-is-elevated/build»
CXX(target) Release/obj.target/iselevated/src/iselevated.o
make: g : File o directory non esistente
make: *** [iselevated.target.mk:121: Release/obj.target/iselevated/src/iselevated.o] Errore 127
make: uscita dalla directory «/home/matteopossamai/open_source/vscode/node_modules/native-is-elevated/build»
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (node:events:527:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Linux 5.13.16-200.fc34.x86_64
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/matteopossamai/open_source/vscode/node_modules/native-is-elevated
gyp ERR! node -v v16.15.0
I am not sure what the problem is and how to fix it. I would really like to start contributing and understand everything is going on, but I just started, so I have some lacks of knowledge.
The next step should be use yarn watch, but there is an error, that I think depend on the previous error.
If you can, please help me, I really need it
CodePudding user response:
I can't understand why some persons here on stack overflow put dislike for no reason. As far as I can see there's a problem with the local repository. The error in the terminal guides, just read it!
make: ingresso nella directory «/home/matteopossamai/open_source/vscode/node_modules/native-is-elevated/build»
CXX(target) Release/obj.target/iselevated/src/iselevated.o
make: g : File o directory non esistente
My suggestion is to create a new folder, fork locally from GitHub the project, and retry. P.S: hai controllato di aver installato tutte le dipendenze correttamente? Tuttalpiù da terminale fai un bel update/upgrade e controlla dalla pagina del progetto di cos'hai bisogno per sviluppare in locale.