apache / incubator-seata

:fire: Seata is an easy-to-use, high-performance, open source distributed transaction solution.
https://seata.apache.org/
Apache License 2.0
25.38k stars 8.79k forks source link

npm error #6982

Closed YvCeung closed 2 weeks ago

YvCeung commented 3 weeks ago

Ⅰ. Issue Description

when i execute './mvnw clean install -DskipTests=true -e' ,the following error will be reported I noticed that there was an issue https://github.com/apache/incubator-seata/issues/6690 before that solved this problem, but I still got an error after updating the relevant PR code to my local computer.

我注意到 https://github.com/apache/incubator-seata/pull/6692 这个pr已经解决了这个问题,于是我把这个pr变更的test.yml文件copy了一份覆盖到我的本地,但是执行的时候还是会报错,求助各位大佬,这个问题卡了好几天了

Ⅱ. Describe what happened

If there is an exception, please attach the exception trace:

[INFO] npm ERR! command failed
[INFO] npm ERR! command sh -c node scripts/build.js
[INFO] npm ERR! Binary found at /Users/zhangyu/workspace/incubator-seata/console/src/main/resources/static/console-fe/node_modules/node-sass/vendor/darwin-arm64-111/binding.node
[INFO] npm ERR! Testing binary
[INFO] npm ERR! Binary has a problem: Error: dlopen(/Users/zhangyu/workspace/incubator-seata/console/src/main/resources/static/console-fe/node_modules/node-sass/vendor/darwin-arm64-111/binding.node, 0x0001): tried: '/Users/zhangyu/workspace/incubator-seata/console/src/main/resources/static/console-fe/node_modules/node-sass/vendor/darwin-arm64-111/binding.node' (not a mach-o file), '/System/Volumes/Preboot/Cryptexes/OS/Users/zhangyu/workspace/incubator-seata/console/src/main/resources/static/console-fe/node_modules/node-sass/vendor/darwin-arm64-111/binding.node' (no such file), '/Users/zhangyu/workspace/incubator-seata/console/src/main/resources/static/console-fe/node_modules/node-sass/vendor/darwin-arm64-111/binding.node' (not a mach-o file)
[INFO] npm ERR!     at Module._extensions..node (node:internal/modules/cjs/loader:1332:18)
[INFO] npm ERR!     at Module.load (node:internal/modules/cjs/loader:1103:32)
[INFO] npm ERR!     at Module._load (node:internal/modules/cjs/loader:942:12)
[INFO] npm ERR!     at Module.require (node:internal/modules/cjs/loader:1127:19)
[INFO] npm ERR!     at require (node:internal/modules/helpers:112:18)
[INFO] npm ERR!     at module.exports (/Users/zhangyu/workspace/incubator-seata/console/src/main/resources/static/console-fe/node_modules/node-sass/lib/binding.js:19:10)
[INFO] npm ERR!     at Object.<anonymous> (/Users/zhangyu/workspace/incubator-seata/console/src/main/resources/static/console-fe/node_modules/node-sass/lib/index.js:13:35)
[INFO] npm ERR!     at Module._compile (node:internal/modules/cjs/loader:1246:14)
[INFO] npm ERR!     at Module._extensions..js (node:internal/modules/cjs/loader:1300:10)
[INFO] npm ERR!     at Module.load (node:internal/modules/cjs/loader:1103:32) {
[INFO] npm ERR!   code: 'ERR_DLOPEN_FAILED'
[INFO] npm ERR! }
[INFO] npm ERR! Building the binary locally
[INFO] npm ERR! Building: /Users/zhangyu/workspace/incubator-seata/console/src/main/resources/static/console-fe/node/node /Users/zhangyu/workspace/incubator-seata/console/src/main/resources/static/console-fe/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
[INFO] npm ERR! gyp info it worked if it ends with ok
[INFO] npm ERR! gyp verb cli [
[INFO] npm ERR! gyp verb cli   '/Users/zhangyu/workspace/incubator-seata/console/src/main/resources/static/console-fe/node/node',
[INFO] npm ERR! gyp verb cli   '/Users/zhangyu/workspace/incubator-seata/console/src/main/resources/static/console-fe/node_modules/node-gyp/bin/node-gyp.js',
[INFO] npm ERR! gyp verb cli   'rebuild',
[INFO] npm ERR! gyp verb cli   '--verbose',
[INFO] npm ERR! gyp verb cli   '--libsass_ext=',
[INFO] npm ERR! gyp verb cli   '--libsass_cflags=',
[INFO] npm ERR! gyp verb cli   '--libsass_ldflags=',
[INFO] npm ERR! gyp verb cli   '--libsass_library='
[INFO] npm ERR! gyp verb cli ]
[INFO] npm ERR! gyp info using node-gyp@8.4.1
[INFO] npm ERR! gyp info using node@19.5.0 | darwin | arm64
[INFO] npm ERR! gyp verb command rebuild []
[INFO] npm ERR! gyp verb command clean []
[INFO] npm ERR! gyp verb clean removing "build" directory
[INFO] npm ERR! gyp verb command configure []
[INFO] npm ERR! gyp verb find Python Python is not set from command line or npm configuration
[INFO] npm ERR! gyp verb find Python Python is not set from environment variable PYTHON
[INFO] npm ERR! gyp verb find Python checking if "python3" can be used
[INFO] npm ERR! gyp verb find Python - executing "python3" to get executable path
[INFO] npm ERR! gyp verb find Python - executable path is "/opt/homebrew/opt/python@3.12/bin/python3.12"
[INFO] npm ERR! gyp verb find Python - executing "/opt/homebrew/opt/python@3.12/bin/python3.12" to get version
[INFO] npm ERR! gyp verb find Python - version is "3.12.4"
[INFO] npm ERR! gyp info find Python using Python version 3.12.4 found at "/opt/homebrew/opt/python@3.12/bin/python3.12"
[INFO] npm ERR! gyp verb get node dir no --target version specified, falling back to host node version: 19.5.0
[INFO] npm ERR! gyp verb command install [ '19.5.0' ]
[INFO] npm ERR! gyp verb install input version string "19.5.0"
[INFO] npm ERR! gyp verb install installing version: 19.5.0
[INFO] npm ERR! gyp verb install --ensure was passed, so won't reinstall if already installed
[INFO] npm ERR! gyp verb install version is already installed, need to check "installVersion"
[INFO] npm ERR! gyp verb got "installVersion" 9
[INFO] npm ERR! gyp verb needs "installVersion" 9
[INFO] npm ERR! gyp verb install version is good
[INFO] npm ERR! gyp verb get node dir target node version installed: 19.5.0
[INFO] npm ERR! gyp verb build dir attempting to create "build" dir: /Users/zhangyu/workspace/incubator-seata/console/src/main/resources/static/console-fe/node_modules/node-sass/build
[INFO] npm ERR! gyp verb build dir "build" dir needed to be created? Yes
[INFO] npm ERR! gyp verb build/config.gypi creating config file
[INFO] npm ERR! gyp verb build/config.gypi writing out config file: /Users/zhangyu/workspace/incubator-seata/console/src/main/resources/static/console-fe/node_modules/node-sass/build/config.gypi
[INFO] npm ERR! gyp verb config.gypi checking for gypi file: /Users/zhangyu/workspace/incubator-seata/console/src/main/resources/static/console-fe/node_modules/node-sass/config.gypi
[INFO] npm ERR! gyp verb common.gypi checking for gypi file: /Users/zhangyu/workspace/incubator-seata/console/src/main/resources/static/console-fe/node_modules/node-sass/common.gypi
[INFO] npm ERR! gyp verb gyp gyp format was not specified; forcing "make"
[INFO] npm ERR! gyp info spawn /opt/homebrew/opt/python@3.12/bin/python3.12
[INFO] npm ERR! gyp info spawn args [
[INFO] npm ERR! gyp info spawn args   '/Users/zhangyu/workspace/incubator-seata/console/src/main/resources/static/console-fe/node_modules/node-gyp/gyp/gyp_main.py',
[INFO] npm ERR! gyp info spawn args   'binding.gyp',
[INFO] npm ERR! gyp info spawn args   '-f',
[INFO] npm ERR! gyp info spawn args   'make',
[INFO] npm ERR! gyp info spawn args   '-I',
[INFO] npm ERR! gyp info spawn args   '/Users/zhangyu/workspace/incubator-seata/console/src/main/resources/static/console-fe/node_modules/node-sass/build/config.gypi',
[INFO] npm ERR! gyp info spawn args   '-I',
[INFO] npm ERR! gyp info spawn args   '/Users/zhangyu/workspace/incubator-seata/console/src/main/resources/static/console-fe/node_modules/node-gyp/addon.gypi',
[INFO] npm ERR! gyp info spawn args   '-I',
[INFO] npm ERR! gyp info spawn args   '/Users/zhangyu/Library/Caches/node-gyp/19.5.0/include/node/common.gypi',
[INFO] npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
[INFO] npm ERR! gyp info spawn args   '-Dvisibility=default',
[INFO] npm ERR! gyp info spawn args   '-Dnode_root_dir=/Users/zhangyu/Library/Caches/node-gyp/19.5.0',
[INFO] npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/Users/zhangyu/workspace/incubator-seata/console/src/main/resources/static/console-fe/node_modules/node-gyp',
[INFO] npm ERR! gyp info spawn args   '-Dnode_lib_file=/Users/zhangyu/Library/Caches/node-gyp/19.5.0/<(target_arch)/node.lib',
[INFO] npm ERR! gyp info spawn args   '-Dmodule_root_dir=/Users/zhangyu/workspace/incubator-seata/console/src/main/resources/static/console-fe/node_modules/node-sass',
[INFO] npm ERR! gyp info spawn args   '-Dnode_engine=v8',
[INFO] npm ERR! gyp info spawn args   '--depth=.',
[INFO] npm ERR! gyp info spawn args   '--no-parallel',
[INFO] npm ERR! gyp info spawn args   '--generator-output',
[INFO] npm ERR! gyp info spawn args   'build',
[INFO] npm ERR! gyp info spawn args   '-Goutput_dir=.'
[INFO] npm ERR! gyp info spawn args ]
[INFO] npm ERR! Traceback (most recent call last):
[INFO] npm ERR!   File "/Users/zhangyu/workspace/incubator-seata/console/src/main/resources/static/console-fe/node_modules/node-gyp/gyp/gyp_main.py", line 42, in <module>
[INFO] npm ERR!     import gyp  # noqa: E402
[INFO] npm ERR!     ^^^^^^^^^^
[INFO] npm ERR!   File "/Users/zhangyu/workspace/incubator-seata/console/src/main/resources/static/console-fe/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 9, in <module>
[INFO] npm ERR!     import gyp.input
[INFO] npm ERR!   File "/Users/zhangyu/workspace/incubator-seata/console/src/main/resources/static/console-fe/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 19, in <module>
[INFO] npm ERR!     from distutils.version import StrictVersion
[INFO] npm ERR! ModuleNotFoundError: No module named 'distutils'
[INFO] npm ERR! gyp ERR! configure error 
[INFO] npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
[INFO] npm ERR! gyp ERR! stack     at ChildProcess.onCpExit (/Users/zhangyu/workspace/incubator-seata/console/src/main/resources/static/console-fe/node_modules/node-gyp/lib/configure.js:259:16)
[INFO] npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:512:28)
[INFO] npm ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:293:12)
[INFO] npm ERR! gyp ERR! System Darwin 22.5.0
[INFO] npm ERR! gyp ERR! command "/Users/zhangyu/workspace/incubator-seata/console/src/main/resources/static/console-fe/node/node" "/Users/zhangyu/workspace/incubator-seata/console/src/main/resources/static/console-fe/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
[INFO] npm ERR! gyp ERR! cwd /Users/zhangyu/workspace/incubator-seata/console/src/main/resources/static/console-fe/node_modules/node-sass
[INFO] npm ERR! gyp ERR! node -v v19.5.0
[INFO] npm ERR! gyp ERR! node-gyp -v v8.4.1
[INFO] npm ERR! gyp ERR! not ok 
[INFO] npm ERR! Build failed with error code: 1
[INFO] 
[INFO] npm ERR! A complete log of this run can be found in:
[INFO] npm ERR!     /Users/zhangyu/.npm/_logs/2024-11-05T12_55_48_912Z-debug-0.log

Ⅲ. Describe what you expected to happen

Ⅳ. How to reproduce it (as minimally and precisely as possible)

  1. xxx
  2. xxx
  3. xxx

Minimal yet complete reproducer code (or URL to code):

Ⅴ. Anything else we need to know?

Ⅵ. Environment:

slievrly commented 3 weeks ago

python3 -m ensurepip --upgrade python3 -m pip install --upgrade pip setuptools python3 -m pip install --upgrade setuptools