nodejs / node-gyp

Node.js native addon build tool
MIT License
9.98k stars 1.8k forks source link

npm issue airgram #2790

Closed njfamirm closed 3 months ago

njfamirm commented 1 year ago
Verbose output (from npm or node-gyp): ``` yarn install --verbose [4/4] 🔨 Building fresh packages... [1/3] ⠠ ref-napi [2/3] ⠠ nodemon [1/3] ⠐ ref-napi [-/3] ⠐ waiting... verbose 4.662099209 /Users/njfamirm/project/tdtest/node_modules/node-gyp-build/index.js:60 throw new Error('No native build was found for ' + target + '\n loaded from: ' + dir + '\n') ^ Error: No native build was found for platform=darwin arch=arm64 runtime=node abi=111 uv=1 armv=8 libc=glibc node=19.2.0 loaded from: /Users/njfamirm/project/tdtest/node_modules/ref-napi at load.path (/Users/njfamirm/project/tdtest/node_modules/node-gyp-build/index.js:60:9) at load (/Users/njfamirm/project/tdtest/node_modules/node-gyp-build/index.js:22:30) at Object. (/Users/njfamirm/project/tdtest/node_modules/node-gyp-build/build-test.js:19:19) at Module._compile (node:internal/modules/cjs/loader:1218:14) at Module._extensions..js (node:internal/modules/cjs/loader:1272:10) at Module.load (node:internal/modules/cjs/loader:1081:32) at Module._load (node:internal/modules/cjs/loader:922:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:82:12) at node:internal/main/run_main_module:23:47 Node.js v19.2.0 gyp info it worked if it ends with ok gyp info using node-gyp@9.1.0 gyp info using node@19.2.0 | darwin | arm64 gyp info find Python using Python version 3.10.9 found at "/opt/homebrew/opt/python@3.10/bin/python3.10" gyp info spawn /opt/homebrew/opt/python@3.10/bin/python3.10 gyp info spawn args [ gyp info spawn args '/Users/njfamirm/.nvm/versions/node/v19.2.0/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 '/Users/njfamirm/project/tdtest/node_modules/ref-napi/build/config.gypi', gyp info spawn args '-I', gyp info spawn args '/Users/njfamirm/.nvm/versions/node/v19.2.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi', gyp info spawn args '-I', gyp info spawn args '/Users/njfamirm/Library/Caches/node-gyp/19.2.0/include/node/common.gypi', gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args '-Dvisibility=default', gyp info spawn args '-Dnode_root_dir=/Users/njfamirm/Library/Caches/node-gyp/19.2.0', gyp info spawn args '-Dnode_gyp_dir=/Users/njfamirm/.nvm/versions/node/v19.2.0/lib/node_modules/npm/node_modules/node-gyp', gyp info spawn args '-Dnode_lib_file=/Users/njfamirm/Library/Caches/node-gyp/19.2.0/<(target_arch)/node.lib', gyp info spawn args '-Dmodule_root_dir=/Users/njfamirm/project/tdtest/node_modules/ref-napi', 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' ] CC(target) Release/obj.target/nothing/../node-addon-api/src/nothing.o LIBTOOL-STATIC Release/nothing.a warning: /Library/Developer/CommandLineTools/usr/bin/libtool: archive library: Release/nothing.a the table of contents is empty (no object file members in the library define global symbols) CXX(target) Release/obj.target/binding/src/binding.o ../src/binding.cc:293:13: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] *rptr = std::move(Reference::New(val)); ^ ../src/binding.cc:293:13: note: remove std::move call here *rptr = std::move(Reference::New(val)); ^~~~~~~~~~ ~ 1 warning generated. [3/3] ⠄ ffi-napi [-/3] ⠄ waiting... verbose 5.939356167 Error: /Users/njfamirm/project/tdtest/node_modules/ffi-napi: Command failed. Exit code: 1 Command: node-gyp-build Arguments: Directory: /Users/njfamirm/project/tdtest/node_modules/ffi-napi Output: /Users/njfamirm/project/tdtest/node_modules/node-gyp-build/index.js:60 throw new Error('No native build was found for ' + target + '\n loaded from: ' + dir + '\n') ^ Error: No native build was found for platform=darwin arch=arm64 runtime=node abi=111 uv=1 armv=8 libc=glibc node=19.2.0 loaded from: /Users/njfamirm/project/tdtest/node_modules/ffi-napi at load.path (/Users/njfamirm/project/tdtest/node_modules/node-gyp-build/index.js:60:9) at load (/Users/njfamirm/project/tdtest/node_modules/node-gyp-build/index.js:22:30) at Object. (/Users/njfamirm/project/tdtest/node_modules/node-gyp-build/build-test.js:19:19) at Module._compile (node:internal/modules/cjs/loader:1218:14) at Module._extensions..js (node:internal/modules/cjs/loader:1272:10) at Module.load (node:internal/modules/cjs/loader:1081:32) at Module._load (node:internal/modules/cjs/loader:922:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:82:12) at node:internal/main/run_main_module:23:47 Node.js v19.2.0 gyp info it worked if it ends with ok gyp info using node-gyp@9.1.0 gyp info using node@19.2.0 | darwin | arm64 gyp info find Python using Python version 3.10.9 found at "/opt/homebrew/opt/python@3.10/bin/python3.10" gyp info spawn /opt/homebrew/opt/python@3.10/bin/python3.10 gyp info spawn args [ gyp info spawn args '/Users/njfamirm/.nvm/versions/node/v19.2.0/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 '/Users/njfamirm/project/tdtest/node_modules/ffi-napi/build/config.gypi', gyp info spawn args '-I', gyp info spawn args '/Users/njfamirm/.nvm/versions/node/v19.2.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi', gyp info spawn args '-I', gyp info spawn args '/Users/njfamirm/Library/Caches/node-gyp/19.2.0/include/node/common.gypi', gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args '-Dvisibility=default', gyp info spawn args '-Dnode_root_dir=/Users/njfamirm/Library/Caches/node-gyp/19.2.0', gyp info spawn args '-Dnode_gyp_dir=/Users/njfamirm/.nvm/versions/node/v19.2.0/lib/node_modules/npm/node_modules/node-gyp', gyp info spawn args '-Dnode_lib_file=/Users/njfamirm/Library/Caches/node-gyp/19.2.0/<(target_arch)/node.lib', gyp info spawn args '-Dmodule_root_dir=/Users/njfamirm/project/tdtest/node_modules/ffi-napi', 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' ] CC(target) Release/obj.target/nothing/../node-addon-api/src/nothing.o LIBTOOL-STATIC Release/nothing.a warning: /Library/Developer/CommandLineTools/usr/bin/libtool: archive library: Release/nothing.a the table of contents is empty (no object file members in the library define global symbols) CC(target) Release/obj.target/ffi/deps/libffi/src/prep_cif.o ../deps/libffi/src/prep_cif.c:26:10: fatal error: 'ffi.h' file not found #include ^~~~~~~ 1 error generated. make: *** [Release/obj.target/ffi/deps/libffi/src/prep_cif.o] Error 1 gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/Users/njfamirm/.nvm/versions/node/v19.2.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:201:23) gyp ERR! stack at ChildProcess.emit (node:events:513:28) gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:293:12) gyp ERR! System Darwin 21.6.0 gyp ERR! command "/Users/njfamirm/.nvm/versions/node/v19.2.0/bin/node" "/Users/njfamirm/.nvm/versions/node/v19.2.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /Users/njfamirm/project/tdtest/node_modules/ffi-napi gyp ERR! node -v v19.2.0 gyp ERR! node-gyp -v v9.1.0 gyp ERR! not ok at ProcessTermError.ExtendableBuiltin (/Users/njfamirm/.yarn/lib/cli.js:721:66) at ProcessTermError.MessageError (/Users/njfamirm/.yarn/lib/cli.js:750:123) at new ProcessTermError (/Users/njfamirm/.yarn/lib/cli.js:790:113) at ChildProcess. (/Users/njfamirm/.yarn/lib/cli.js:25787:17) at ChildProcess.emit (node:events:513:28) at maybeClose (node:internal/child_process:1098:16) at ChildProcess._handle.onexit (node:internal/child_process:304:5) error /Users/njfamirm/project/tdtest/node_modules/ffi-napi: Command failed. Exit code: 1 Command: node-gyp-build Arguments: Directory: /Users/njfamirm/project/tdtest/node_modules/ffi-napi Output: /Users/njfamirm/project/tdtest/node_modules/node-gyp-build/index.js:60 throw new Error('No native build was found for ' + target + '\n loaded from: ' + dir + '\n') ^ Error: No native build was found for platform=darwin arch=arm64 runtime=node abi=111 uv=1 armv=8 libc=glibc node=19.2.0 loaded from: /Users/njfamirm/project/tdtest/node_modules/ffi-napi at load.path (/Users/njfamirm/project/tdtest/node_modules/node-gyp-build/index.js:60:9) at load (/Users/njfamirm/project/tdtest/node_modules/node-gyp-build/index.js:22:30) at Object. (/Users/njfamirm/project/tdtest/node_modules/node-gyp-build/build-test.js:19:19) at Module._compile (node:internal/modules/cjs/loader:1218:14) at Module._extensions..js (node:internal/modules/cjs/loader:1272:10) at Module.load (node:internal/modules/cjs/loader:1081:32) at Module._load (node:internal/modules/cjs/loader:922:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:82:12) at node:internal/main/run_main_module:23:47 Node.js v19.2.0 gyp info it worked if it ends with ok gyp info using node-gyp@9.1.0 gyp info using node@19.2.0 | darwin | arm64 gyp info find Python using Python version 3.10.9 found at "/opt/homebrew/opt/python@3.10/bin/python3.10" gyp info spawn /opt/homebrew/opt/python@3.10/bin/python3.10 gyp info spawn args [ gyp info spawn args '/Users/njfamirm/.nvm/versions/node/v19.2.0/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 '/Users/njfamirm/project/tdtest/node_modules/ffi-napi/build/config.gypi', gyp info spawn args '-I', gyp info spawn args '/Users/njfamirm/.nvm/versions/node/v19.2.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi', gyp info spawn args '-I', gyp info spawn args '/Users/njfamirm/Library/Caches/node-gyp/19.2.0/include/node/common.gypi', gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args '-Dvisibility=default', gyp info spawn args '-Dnode_root_dir=/Users/njfamirm/Library/Caches/node-gyp/19.2.0', gyp info spawn args '-Dnode_gyp_dir=/Users/njfamirm/.nvm/versions/node/v19.2.0/lib/node_modules/npm/node_modules/node-gyp', gyp info spawn args '-Dnode_lib_file=/Users/njfamirm/Library/Caches/node-gyp/19.2.0/<(target_arch)/node.lib', gyp info spawn args '-Dmodule_root_dir=/Users/njfamirm/project/tdtest/node_modules/ffi-napi', 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' ] CC(target) Release/obj.target/nothing/../node-addon-api/src/nothing.o LIBTOOL-STATIC Release/nothing.a warning: /Library/Developer/CommandLineTools/usr/bin/libtool: archive library: Release/nothing.a the table of contents is empty (no object file members in the library define global symbols) CC(target) Release/obj.target/ffi/deps/libffi/src/prep_cif.o ../deps/libffi/src/prep_cif.c:26:10: fatal error: 'ffi.h' file not found #include ^~~~~~~ 1 error generated. make: *** [Release/obj.target/ffi/deps/libffi/src/prep_cif.o] Error 1 gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/Users/njfamirm/.nvm/versions/node/v19.2.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:201:23) gyp ERR! stack at ChildProcess.emit (node:events:513:28) gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:293:12) gyp ERR! System Darwin 21.6.0 gyp ERR! command "/Users/njfamirm/.nvm/versions/node/v19.2.0/bin/node" "/Users/njfamirm/.nvm/versions/node/v19.2.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /Users/njfamirm/project/tdtest/node_modules/ffi-napi gyp ERR! node -v v19.2.0 gyp ERR! node-gyp -v v9.1.0 ```
yarn install
yarn install v1.22.19
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 🔨  Building fresh packages...
[3/3] ⠈ ffi-napi
[-/3] ⠈ waiting...
error /Users/njfamirm/project/tdtest/node_modules/ffi-napi: Command failed.
Exit code: 1
Command: node-gyp-build
Arguments:
Directory: /Users/njfamirm/project/tdtest/node_modules/ffi-napi
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@9.1.0
gyp info using node@19.2.0 | darwin | arm64
gyp info find Python using Python version 3.10.9 found at "/opt/homebrew/opt/python@3.10/bin/python3.10"
gyp info spawn /opt/homebrew/opt/python@3.10/bin/python3.10
gyp info spawn args [
gyp info spawn args   '/Users/njfamirm/.nvm/versions/node/v19.2.0/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   '/Users/njfamirm/project/tdtest/node_modules/ffi-napi/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/njfamirm/.nvm/versions/node/v19.2.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/njfamirm/Library/Caches/node-gyp/19.2.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/njfamirm/Library/Caches/node-gyp/19.2.0',
gyp info spawn args   '-Dnode_gyp_dir=/Users/njfamirm/.nvm/versions/node/v19.2.0/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/njfamirm/Library/Caches/node-gyp/19.2.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/njfamirm/project/tdtest/node_modules/ffi-napi',
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' ]
  CC(target) Release/obj.target/nothing/../node-addon-api/src/nothing.o
  LIBTOOL-STATIC Release/nothing.a
warning: /Library/Developer/CommandLineTools/usr/bin/libtool: archive library: Release/nothing.a the table of contents is empty (no object file members in the library define global symbols)
  CC(target) Release/obj.target/ffi/deps/libffi/src/prep_cif.o
../deps/libffi/src/prep_cif.c:26:10: fatal error: 'ffi.h' file not found
#include <ffi.h>
         ^~~~~~~
1 error generated.
make: *** [Release/obj.target/ffi/deps/libffi/src/prep_cif.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/njfamirm/.nvm/versions/node/v19.2.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:201:23)
gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:293:12)
gyp ERR! System Darwin 21.6.0
gyp ERR! command "/Users/njfamirm/.nvm/versions/node/v19.2.0/bin/node" "/Users/njfamirm/.nvm/versions/node/v19.2.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/njfamirm/project/tdtest/node_modules/ffi-napi
gyp ERR! node -v v19.2.0
gyp ERR! node-gyp -v v9.1.0

I spent a lot of time researching to solve the problem But it was useless!

njfamirm commented 1 year ago

Thank you in advance for your help

cclauss commented 1 year ago

brew install libffi and then try your command again.

njfamirm commented 1 year ago

Unfortunately, it was not solved!

λ locate ffi.h
/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/ffi/ffi.h
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/ffi/ffi.h
/opt/homebrew/Cellar/libffi/3.4.4/include/ffi.h
/opt/homebrew/Cellar/luajit/2.1.0-beta3-20221004.1/share/doc/luajit/ext_ffi.html
/opt/homebrew/include/ffi.h
cclauss commented 1 year ago

What do you see when you... % brew doctor && brew list % sw_vers && xcode-select --version && xcode-select --print-path && xcode-select --install and then go to Apple menu | System Settings | General | Software Update and see if there is anything that needs to be installed.

njfamirm commented 1 year ago
λ brew doctor && brew list

Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected dylibs:
  /usr/local/lib/libtdjson.1.8.10.dylib
  /usr/local/lib/libtdjson.1.8.5.dylib

Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected header files:
  /usr/local/include/td/telegram/Client.h
  /usr/local/include/td/telegram/Log.h
  /usr/local/include/td/telegram/td_api.h
  /usr/local/include/td/telegram/td_json_client.h
  /usr/local/include/td/telegram/td_log.h
  /usr/local/include/td/telegram/tdjson_export.h
  /usr/local/include/td/tl/TlObject.h

Warning: Unbrewed '.pc' files were found in /usr/local/lib/pkgconfig.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected '.pc' files:
  /usr/local/lib/pkgconfig/tdactor.pc
  /usr/local/lib/pkgconfig/tdapi.pc
  /usr/local/lib/pkgconfig/tdclient.pc
  /usr/local/lib/pkgconfig/tdcore.pc
  /usr/local/lib/pkgconfig/tddb.pc
  /usr/local/lib/pkgconfig/tdjson.pc
  /usr/local/lib/pkgconfig/tdjson_private.pc
  /usr/local/lib/pkgconfig/tdjson_static.pc
  /usr/local/lib/pkgconfig/tdnet.pc
  /usr/local/lib/pkgconfig/tdsqlite.pc
  /usr/local/lib/pkgconfig/tdutils.pc

Warning: Unbrewed static libraries were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected static libraries:
  /usr/local/lib/libtdactor.a
  /usr/local/lib/libtdapi.a
  /usr/local/lib/libtdclient.a
  /usr/local/lib/libtdcore.a
  /usr/local/lib/libtddb.a
  /usr/local/lib/libtdjson_private.a
  /usr/local/lib/libtdjson_static.a
  /usr/local/lib/libtdnet.a
  /usr/local/lib/libtdsqlite.a
  /usr/local/lib/libtdutils.a
λ sw_vers && xcode-select --version && xcode-select --print-path && xcode-select --install
ProductName:    macOS
ProductVersion: 12.6
BuildVersion:   21G115
xcode-select version 2395.
/Library/Developer/CommandLineTools
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
shenfusheng commented 1 year ago

@cclauss @njfamirm I got the same issue, and also have no idea how to solve this problem. `sfs@sfsdeMacBook-Pro app % npm i

> screen-share@4.1.0 postinstall
> npm run electron-rebuild && npm run link-modules

> screen-share@4.1.0 electron-rebuild
> node -r ts-node/register ../../.erb/scripts/electron-rebuild.js

⠼ Building modules: 0/2  CC(target) Release/obj.target/nothing/../node-addon-api/nothing.o
  CC(target) Release/obj.target/nothing/../node-addon-api/nothing.o
⠴ Building modules: 0/2rm: ./Release/.deps/Release/obj.target/nothing/../node-addon-api/nothing.o.d.raw: No such file or directory
make: *** [Release/obj.target/nothing/../node-addon-api/nothing.o] Error 1
✖ Rebuild Failed
  LIBTOOL-STATIC Release/nothing.a

An unhandled error occurred inside electron-rebuild
node-gyp failed to rebuild '/Users/sfs/Desktop/Promethean/casting-electron/release/app/node_modules/ffi-napi'.
For more information, rerun with the DEBUG environment variable set to "electron-rebuild".

Error: `make` failed with exit code: 2

Error: node-gyp failed to rebuild '/Users/sfs/Desktop/Promethean/casting-electron/release/app/node_modules/ffi-napi'.
For more information, rerun with the DEBUG environment variable set to "electron-rebuild".

Error: `make` failed with exit code: 2

    at NodeGyp.rebuildModule (/Users/sfs/Desktop/Promethean/casting-electron/node_modules/electron-rebuild/lib/src/module-type/node-gyp.js:117:19)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async ModuleRebuilder.rebuildNodeGypModule (/Users/sfs/Desktop/Promethean/casting-electron/node_modules/electron-rebuild/lib/src/module-rebuilder.js:94:9)
    at async ModuleRebuilder.rebuild (/Users/sfs/Desktop/Promethean/casting-electron/node_modules/electron-rebuild/lib/src/module-rebuilder.js:124:14)
    at async Rebuilder.rebuildModuleAt (/Users/sfs/Desktop/Promethean/casting-electron/node_modules/electron-rebuild/lib/src/rebuild.js:145:13)
    at async Promise.all (index 10)
    at async Rebuilder.rebuild (/Users/sfs/Desktop/Promethean/casting-electron/node_modules/electron-rebuild/lib/src/rebuild.js:104:13)
    at async /Users/sfs/Desktop/Promethean/casting-electron/node_modules/electron-rebuild/lib/src/cli.js:154:9
Error: Command failed: ../../node_modules/.bin/electron-rebuild --parallel --force --types prod,dev,optional --module-dir .
    at checkExecSyncError (node:child_process:861:11)
    at execSync (node:child_process:932:15)
    at Object.<anonymous> (/Users/sfs/Desktop/Promethean/casting-electron/.erb/scripts/electron-rebuild.js:16:11)
    at Module._compile (node:internal/modules/cjs/loader:1155:14)
    at Module.m._compile (/Users/sfs/Desktop/Promethean/casting-electron/node_modules/ts-node/src/index.ts:1455:23)
    at Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
    at Object.require.extensions.<computed> [as .js] (/Users/sfs/Desktop/Promethean/casting-electron/node_modules/ts-node/src/index.ts:1458:12)
    at Module.load (node:internal/modules/cjs/loader:1033:32)
    at Function.Module._load (node:internal/modules/cjs/loader:868:12) {
  status: 255,
  signal: null,
  output: [ null, null, null ],
  pid: 69220,
  stdout: null,
  stderr: null
}
npm ERR! code 1
npm ERR! path /Users/sfs/Desktop/Promethean/casting-electron/release/app
npm ERR! command failed
npm ERR! command sh -c npm run electron-rebuild && npm run link-modules

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/sfs/.npm/_logs/2023-02-14T09_22_04_904Z-debug-0.log
sfs@sfsdeMacBook-Pro app % warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: archive library: Release/nothing.a the table of contents is empty (no object file members in the library define global symbols)
  CXX(target) Release/obj.target/binding/src/binding.o
../src/binding.cc:305:13: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
    *rptr = std::move(Reference<Object>::New(val));
            ^
../src/binding.cc:305:13: note: remove std::move call here
    *rptr = std::move(Reference<Object>::New(val));
            ^~~~~~~~~~                           ~
1 warning generated.
  SOLINK_MODULE(target) Release/binding.node
pawlek commented 1 year ago

same problem(

shenfusheng commented 1 year ago

你好,邮件已收到,谢谢!

cclauss commented 3 months ago

Duplicate of

  • node-ffi-napi/node-ffi-napi#269