Tag Archives: xviz./scripts/runkittiexample.sh

[xviz] ./scripts/run-kitti-example.sh Excute Error: gyp ERR! Node-gyp failed to build your package.

xviz github: https://github.com/uber/xviz

Xviz GitHub’s guide includes the following steps:

# Download KITTI data
$ ./scripts/download-kitti-data.sh

# Convert KITTI data if necessary and run the XVIZ Server and Client
$ ./scripts/run-kitti-example.sh

In the process of converting Kitti data to xviz data, execute./scripts/run-kitti-example.sh and report the error “gyp err! Node gyp failed to build your package”, as follows:

004:~/myworkspaces/vueworkspace/xviz$ ./scripts/run-kitti-example.sh
Generating default KITTI XVIZ data
yarn install v1.22.15
warning package.json: No license field
warning [email protected]: No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
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...
[4/4] Building fresh packages...
[1/3] ⠈ sharp
[2/3] ⠈ node-expat
error /home/myworkspaces/vueworkspace/xviz/examples/converters/kitti/node_modules/node-expat: Command failed.
Exit code: 7
Command: node-gyp rebuild
Arguments:
Directory: /home/myworkspaces/vueworkspace/xviz/examples/converters/kitti/node_modules/node-expat
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.6.9 found at "/usr/bin/python3"
gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack TypeError [ERR_INVALID_ARG_TYPE]: The "original" argument must be of type function
gyp ERR! stack     at Object.promisify (internal/util.js:209:11)
gyp ERR! stack     at Object.<anonymous> (/home/lwx1042024/.config/yarn/global/node_modules/node-gyp/lib/install.js:15:29)
gyp ERR! stack     at Module._compile (module.js:652:30)
gyp ERR! stack     at Object.Module._extensions..js (module.js:663:10)
gyp ERR! stack     at Module.load (module.js:565:32)
gyp ERR! stack     at tryModuleLoad (module.js:505:12)
gyp ERR! stack     at Function.Module._load (module.js:497:3)
gyp ERR! stack     at Module.require (module.js:596:17)
gyp ERR! stack     at require (internal/module.js:11:18)
gyp ERR! stack     at Object.self.commands.(anonymous function) [as install] (/home/.config/yarn/global/node_modules/node-gyp/lib/node-gyp.js:41:14)
gyp ERR! System Linux 4.15.0-144-generic
gyp ERR! command "/usr/bin/node" "/home/.yarn/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/myworkspaces/vueworkspace/xviz/examples/converters/kitti/node_modules/node-expat
gyp ERR! node -v v8.10.0
gyp ERR! node-gyp -v v8.2.0
gyp ERR! Node-gyp failed to build your package.

Solution: enter the xviz/examples/converters/Kitti directory and execute sudo yarn add node gyp – G:

004:~/myworkspaces/vueworkspace/xviz/examples/converters/kitti$ sudo yarn add  node-gyp -g

After installation, execute./scripts/run-kitti-example.sh to generate the GLB file of xviz normally: