lucksoft-yungui / luck-node-mtp

cross-platform android device file management tool
5 stars 2 forks source link

Install failed use with pnpm #4

Open cobbcheng opened 3 months ago

cobbcheng commented 3 months ago

Progress: resolved 26, reused 22, downloaded 4, added 22, done node_modules/.pnpm/luck-node-mtp@1.0.0/node_modules/luck-node-mtp: Running install script, failed in 14.4s .../node_modules/luck-node-mtp install$ node-gyp-build │ gyp info it worked if it ends with ok │ gyp info using node-gyp@10.1.0 │ gyp info using node@20.10.0 | darwin | arm64 │ gyp info find Python using Python version 3.12.2 found at "/opt/homebrew/opt/python@3.12/bin/python3.12" │ gyp http GET https://nodejs.org/download/release/v20.10.0/node-v20.10.0-headers.tar.gz │ gyp http 200 https://nodejs.org/download/release/v20.10.0/node-v20.10.0-headers.tar.gz │ gyp http GET https://nodejs.org/download/release/v20.10.0/SHASUMS256.txt │ gyp http 200 https://nodejs.org/download/release/v20.10.0/SHASUMS256.txt │ gyp info spawn /opt/homebrew/opt/python@3.12/bin/python3.12 │ gyp info spawn args [ │ gyp info spawn args '/Users/xxx/Library/pnpm/global/5/.pnpm/node-gyp@10.1.0/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/xxx/code/usb-test/node_modules/.pnpm/luck-node-mtp@1.0.0/node_modules/luck-node-mtp/build/config.gypi', │ gyp info spawn args '-I', │ gyp info spawn args '/Users/xxx/Library/pnpm/global/5/.pnpm/node-gyp@10.1.0/node_modules/node-gyp/addon.gypi', │ gyp info spawn args '-I', │ gyp info spawn args '/Users/xxx/Library/Caches/node-gyp/20.10.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/xxx/Library/Caches/node-gyp/20.10.0', │ gyp info spawn args '-Dnode_gyp_dir=/Users/xxx/Library/pnpm/global/5/.pnpm/node-gyp@10.1.0/node_modules/node-gyp', │ gyp info spawn args '-Dnode_lib_file=/Users/xxx/Library/Caches/node-gyp/20.10.0/<(target_arch)/node.lib', │ gyp info spawn args '-Dmodule_root_dir=/Users/xxx/code/usb-test/node_modules/.pnpm/luck-node-mtp@1.0.0/node_modules/luck-node-mtp', │ 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@1.7.2/node_modules/node-addon-api/src/nothing.o │ LIBTOOL-STATIC Release/nothing.a │ warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: archive library: Release/nothing.a… │ CXX(target) Release/obj.target/luck-node-mtp/src/luck_mtp.o │ CXX(target) Release/obj.target/luck-node-mtp/src/utils.o │ SOLINK_MODULE(target) Release/luck-node-mtp.node │ ld: library 'mtp' not found │ clang: error: linker command failed with exit code 1 (use -v to see invocation) │ make: *** [Release/luck-node-mtp.node] Error 1 │ gyp ERR! build error │ gyp ERR! stack Error:makefailed with exit code: 2 │ gyp ERR! stack at ChildProcess.<anonymous> (/Users/xxx/Library/pnpm/global/5/.pnpm/node-gyp@10.1.0/node_modules/node-gyp/lib/build.j… │ gyp ERR! System Darwin 23.5.0 │ gyp ERR! command "/Users/xxx/.nvm/versions/node/v20.10.0/bin/node" "/Users/xxx/Library/pnpm/global/5/.pnpm/node-gyp@10.1.0/no… │ gyp ERR! cwd /Users/xxx/code/usb-test/node_modules/.pnpm/luck-node-mtp@1.0.0/node_modules/luck-node-mtp │ gyp ERR! node -v v20.10.0 │ gyp ERR! node-gyp -v v10.1.0 │ gyp ERR! not ok └─ Failed in 14.4s at /Users/xxx/code/usb-test/node_modules/.pnpm/luck-node-mtp@1.0.0/node_modules/luck-node-mtp  ELIFECYCLE  Command failed with exit code 1.

cobbcheng commented 3 months ago

seems like build error, am I need install 'mtp'?