nwjs / nw-gyp

native addon build tool for node-webkit
MIT License
195 stars 46 forks source link

Unable to rebuild with nw-gyp #154

Closed RichardFoss closed 1 year ago

RichardFoss commented 1 year ago

Thanks for nw-gyp! I am getting an error with a rebuild of a project - have just moved to Monterey. I have followed all the suggestions with regard to Xcode - removed, then re-installed command line tools, reset. Possibly need to install the full Xcode?


xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

Traceback (most recent call last): File "/Users/csrf/.nvm/versions/node/v12.13.0/lib/node_modules/nw-gyp/gyp/gyp_main.py", line 16, in sys.exit(gyp.script_main()) File "/Users/csrf/.nvm/versions/node/v12.13.0/lib/node_modules/nw-gyp/gyp/pylib/gyp/init.py", line 545, in script_main return main(sys.argv[1:]) File "/Users/csrf/.nvm/versions/node/v12.13.0/lib/node_modules/nw-gyp/gyp/pylib/gyp/init.py", line 538, in main return gyp_main(args) File "/Users/csrf/.nvm/versions/node/v12.13.0/lib/node_modules/nw-gyp/gyp/pylib/gyp/init.py", line 523, in gyp_main generator.GenerateOutput(flat_list, targets, data, params) File "/Users/csrf/.nvm/versions/node/v12.13.0/lib/node_modules/nw-gyp/gyp/pylib/gyp/generator/make.py", line 2170, in GenerateOutput part_of_all=qualified_target in needed_targets) File "/Users/csrf/.nvm/versions/node/v12.13.0/lib/node_modules/nw-gyp/gyp/pylib/gyp/generator/make.py", line 795, in Write self.Pchify)) File "/Users/csrf/.nvm/versions/node/v12.13.0/lib/node_modules/nw-gyp/gyp/pylib/gyp/generator/make.py", line 1190, in WriteSources cflags = self.xcode_settings.GetCflags(configname) File "/Users/csrf/.nvm/versions/node/v12.13.0/lib/node_modules/nw-gyp/gyp/pylib/gyp/xcode_emulation.py", line 551, in GetCflags archs = self.GetActiveArchs(self.configname) File "/Users/csrf/.nvm/versions/node/v12.13.0/lib/node_modules/nw-gyp/gyp/pylib/gyp/xcode_emulation.py", line 420, in GetActiveArchs xcode_archs_default = GetXcodeArchsDefault() File "/Users/csrf/.nvm/versions/node/v12.13.0/lib/node_modules/nw-gyp/gyp/pylib/gyp/xcode_emulation.py", line 118, in GetXcodeArchsDefault xcodeversion, = XcodeVersion() File "/Users/csrf/.nvm/versions/node/v12.13.0/lib/node_modules/nw-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1265, in XcodeVersion version = re.match(r'(\d.\d.?\d*)', version).groups()[0] AttributeError: 'NoneType' object has no attribute 'groups' gyp ERR! configure error gyp ERR! stack Error: gyp failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (/Users/csrf/.nvm/versions/node/v12.13.0/lib/node_modules/nw-gyp/lib/configure.js:367:16) gyp ERR! stack at ChildProcess.emit (events.js:210:5) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12) gyp ERR! System Darwin 21.6.0 gyp ERR! command "/Users/csrf/.nvm/versions/node/v12.13.0/bin/node" "/Users/csrf/.nvm/versions/node/v12.13.0/bin/nw-gyp" "rebuild" "--target=0.41.3" "--arch=x64" gyp ERR! cwd /Users/csrf/Documents/Git-Repos/ImmerGo-Presonus-SL/immergo-presonus-sl/node_modules/midi gyp ERR! node -v v12.13.0 gyp ERR! nw-gyp -v v3.6.6 gyp ERR! not ok Unable to rebuild package Error: Command failed: cd ./node_modules/midi && nw-gyp rebuild --target=0.41.3 --arch=x64 && cd ../.. at checkExecSyncError (child_process.js:621:11) at execSync (child_process.js:657:15) at reinstallAddonPackage (/Users/csrf/Documents/Git-Repos/ImmerGo-Presonus-SL/immergo-presonus-sl/postinstall.js:12:5) at /Users/csrf/Documents/Git-Repos/ImmerGo-Presonus-SL/immergo-presonus-sl/postinstall.js:25:5 at Array.forEach () at installNwGypDependencies (/Users/csrf/Documents/Git-Repos/ImmerGo-Presonus-SL/immergo-presonus-sl/postinstall.js:24:12) at /Users/csrf/Documents/Git-Repos/ImmerGo-Presonus-SL/immergo-presonus-sl/postinstall.js:158:29 at Object. (/Users/csrf/Documents/Git-Repos/ImmerGo-Presonus-SL/immergo-presonus-sl/postinstall.js:192:3) at Module._compile (internal/modules/cjs/loader.js:956:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10) { status: 1, signal: null, output: [ null, null, null ], pid: 4122, stdout: null, stderr: null } We were unable to rebuild with nw-gyp

RichardFoss commented 1 year ago

Solved by installing the full Xcode, not just command line tools!