nw-gyp rebuild is not working on linux after nw.js v 0.22.3

nw-gyp rebuild gives error on all native modules

  • State which version are you using

0.23.0

  • State which OS version are you running with
    linux ubuntu
  • Provide a reproducible case if possible

for example printer module:

apt-get install libcups2-dev
mkdir test && cd test && npm init
npm i printer
cd node_modules/printer

nw-gyp rebuild –target=0.22.3
^ works

nw-gyp rebuild --target=0.23.0
gives error
gyp info it worked if it ends with ok
gyp info using nw-gyp@3.4.0
gyp info using node@8.0.0 | linux | x64
gyp info spawn /usr/bin/python2
gyp info spawn args [ '/usr/lib/node_modules/nw-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/asp3ctus/test/node_modules/printer/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/lib/node_modules/nw-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/asp3ctus/.nw-gyp/0.23.2/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/home/asp3ctus/.nw-gyp/0.23.2',
gyp info spawn args   '-Dnode_gyp_dir=/usr/lib/node_modules/nw-gyp',
gyp info spawn args   '-Dnode_lib_file=nw.lib',
gyp info spawn args   '-Dmodule_root_dir=/home/asp3ctus/test/node_modules/printer',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '-Dv13=1',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
/bin/sh: 1: ./build/linux/sysroot_ld_path.sh: not found
gyp: Call to './build/linux/sysroot_ld_path.sh /home/asp3ctus/test/node_modules/printer/build/linux/debian_jessie_amd64-sysroot' returned exit status 127 while 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 (/usr/lib/node_modules/nw-gyp/lib/configure.js:324:16)
gyp ERR! stack     at emitTwo (events.js:125:13)
gyp ERR! stack     at ChildProcess.emit (events.js:213:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:197:12)
gyp ERR! System Linux 4.8.0-54-generic
gyp ERR! command "/home/asp3ctus/.nvm/versions/node/v8.0.0/bin/node" "/usr/bin/nw-gyp" "rebuild" "--target=0.23.2" "--arch=x64"
gyp ERR! cwd /home/asp3ctus/test/node_modules/printer
gyp ERR! node -v v8.0.0
gyp ERR! nw-gyp -v v3.4.0
gyp ERR! not ok 

Author: Fantashit

1 thought on “nw-gyp rebuild is not working on linux after nw.js v 0.22.3

  1. If I understand correctly, this is because some settings previously located in //src/build/common.gypi were merged into //src/third_party/node-nw/common.gypi, while these facilities are unavailable for nw-gyp users.

    @rogerwang , are you working on this? If not, I plan to move these settings in //src/third_party/node-nw/commno.gypi back to //src/build/common.gypi.

Comments are closed.