[SOLVED] FXCode not compiling

Hello!

I’m having trouble with FXCode. I’m not sure if this is a bug, but I’ll write in this section anyway because github issues section not active.

To compile, I followed the steps that are described in the vscode manual.

I will write in order what I did and what error I got.

  1. Cloned the repository. The project is on the path “d:/Work/fxcode”. Last commit be3205d from 8 March, 2022.

  2. Installed NodeJS (v16.15.0) from official site with Chocolatey.

  3. Yarn installed automatically (1.22.18)

  4. Python installed automatically (Python 3.10.4)

  5. Installed windows build tool (Visual Studio Build Tools 2019 - Desktop development with C++).

  6. Run yarn command

  7. Got an error

D:\Work\fxcode>yarn
yarn install v1.22.18
$ node build/npm/preinstall.js
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > [email protected]" has incorrect peer dependency "[email protected]^4.0.0".
warning " > [email protected]" has incorrect peer dependency "[email protected]>=7.7.0".
warning " > [email protected]" has incorrect peer dependency "[email protected]^4.0.0".
warning " > [email protected]" has unmet peer dependency "[email protected]^8.0.0".
warning " > [email protected]" has incorrect peer dependency "[email protected]^3.0.0".
warning " > [email protected]" has incorrect peer dependency "[email protected] - 10.x".
warning " > [email protected]" has incorrect peer dependency "[email protected]^4.0.0".
[4/4] Building fresh packages...
[1/19] ⠄ @parcel/watcher
[2/19] ⠄ @vscode/sqlite3
[3/19] ⠄ keytar
[4/19] ⠄ native-is-elevated
error D:\Work\fxcode\node_modules\native-is-elevated: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: D:\Work\fxcode\node_modules\native-is-elevated
Output:
D:\Work\fxcode\node_modules\native-is-elevated>if not defined npm_config_node_gyp (node "D:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp info find Python using Python version 3.10.4 found at "C:\Python310\python.exe"
gyp info find VS using VS2019 (16.11.32510.428) found at:
gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"
gyp info find VS run with --verbose for detailed information
gyp info spawn C:\Python310\python.exe
gyp info spawn args [
gyp info spawn args   'D:\\Program Files\\nodejs\\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   'msvs',
gyp info spawn args   '-I',
gyp info spawn args   'D:\\Work\\fxcode\\node_modules\\native-is-elevated\\build\\config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'D:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\pp2amd6\\AppData\\Local\\node-gyp\\Cache\\13.5.2\\include\\node\\common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=C:\\Users\\pp2amd6\\AppData\\Local\\node-gyp\\Cache\\13.5.2',
gyp info spawn args   '-Dnode_gyp_dir=D:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp',
gyp info spawn args   '-Dnode_lib_file=C:\\\\Users\\\\pp2amd6\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\13.5.2\\\\<(target_arch)\\\\node.lib',
gyp info spawn args   '-Dmodule_root_dir=D:\\Work\\fxcode\\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   'D:\\Work\\fxcode\\node_modules\\native-is-elevated\\build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp: name 'openssl_fips' is not defined while evaluating condition 'openssl_fips != ""' in binding.gyp while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (D:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:261:16)
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 Windows_NT 10.0.19044
gyp ERR! command "D:\\Program Files\\nodejs\\node.exe" "D:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\Work\fxcode\node_modules\native-is-elevated

I cloned the VSCode repository and tried to compile it. Yarn team worked without problems ¯_(ツ)_/¯

I don’t have strong knowledge in nodejs and I have no idea what could be the problem. Do you have any idea how to solve my problem?

I completely forgot that FxDK can be run with the FiveM parameter :slight_smile:

The topic can be deleted, it is not relevant.

Ouch. It could be newer node-gyp regressed something with the electron-rebuild wrapper we use.