환경
M1 애플실리콘 - 맥미니
파이썬 - 3.11.3
노드 - v16.20.0
시도
npm install sharp
오류메세지
➜ 360vr npm install sharp
npm ERR! code 1
npm ERR! path /Users/god-logger/develop/360vr/node_modules/sharp
npm ERR! command failed
npm ERR! command sh -c (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
npm ERR! sharp: Detected globally-installed libvips v8.14.2
npm ERR! sharp: Building from source via node-gyp
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@7.1.2
npm ERR! gyp info using node@16.20.0 | darwin | arm64
npm ERR! gyp info find Python using Python version 3.11.3 found at "/Library/Frameworks/Python.framework/Versions/3.11/bin/python3"
npm ERR! (node:7497) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR! gyp info spawn /Library/Frameworks/Python.framework/Versions/3.11/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/Users/god-logger/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/god-logger/develop/360vr/node_modules/sharp/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/god-logger/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/god-logger/Library/Caches/node-gyp/16.20.0/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/Users/god-logger/Library/Caches/node-gyp/16.20.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/Users/god-logger/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/god-logger/Library/Caches/node-gyp/16.20.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/Users/god-logger/develop/360vr/node_modules/sharp',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! Traceback (most recent call last):
npm ERR! File "/Users/god-logger/node_modules/node-gyp/gyp/gyp_main.py", line 51, in <module>
npm ERR! sys.exit(gyp.script_main())
npm ERR! ^^^^^^^^^^^^^^^^^
npm ERR! File "/Users/god-logger/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 670, in script_main
npm ERR! return main(sys.argv[1:])
npm ERR! ^^^^^^^^^^^^^^^^^^
npm ERR! File "/Users/god-logger/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 662, in main
npm ERR! return gyp_main(args)
npm ERR! ^^^^^^^^^^^^^^
npm ERR! File "/Users/god-logger/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 629, in gyp_main
npm ERR! [generator, flat_list, targets, data] = Load(
npm ERR! ^^^^^
npm ERR! File "/Users/god-logger/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 150, in Load
npm ERR! result = gyp.input.Load(
npm ERR! ^^^^^^^^^^^^^^^
npm ERR! File "/Users/god-logger/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 3021, in Load
npm ERR! LoadTargetBuildFile(
npm ERR! File "/Users/god-logger/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 411, in LoadTargetBuildFile
npm ERR! build_file_data = LoadOneBuildFile(
npm ERR! ^^^^^^^^^^^^^^^^^
npm ERR! File "/Users/god-logger/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 239, in LoadOneBuildFile
npm ERR! build_file_contents = open(build_file_path, "rU").read()
npm ERR! ^^^^^^^^^^^^^^^^^^^^^^^^^^^
npm ERR! ValueError: invalid mode: 'rU' while trying to load binding.gyp
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onCpExit (/Users/god-logger/node_modules/node-gyp/lib/configure.js:351:16)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:293:12)
npm ERR! gyp ERR! System Darwin 22.4.0
npm ERR! gyp ERR! command "/usr/local/bin/node" "/Users/god-logger/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /Users/god-logger/develop/360vr/node_modules/sharp
npm ERR! gyp ERR! node -v v16.20.0
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in: /Users/god-logger/.npm/_logs/2023-05-03T15_13_22_169Z-debug-0.log
➜ 360vr npm install sharp --unsafe-perm
npm ERR! code 1
npm ERR! path /Users/god-logger/develop/360vr/node_modules/sharp
npm ERR! command failed
npm ERR! command sh -c (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
npm ERR! sharp: Detected globally-installed libvips v8.14.2
npm ERR! sharp: Building from source via node-gyp
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@7.1.2
npm ERR! gyp info using node@16.20.0 | darwin | arm64
npm ERR! gyp info find Python using Python version 3.11.3 found at "/Library/Frameworks/Python.framework/Versions/3.11/bin/python3"
npm ERR! (node:7978) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR! gyp info spawn /Library/Frameworks/Python.framework/Versions/3.11/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/Users/god-logger/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/god-logger/develop/360vr/node_modules/sharp/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/god-logger/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/god-logger/Library/Caches/node-gyp/16.20.0/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/Users/god-logger/Library/Caches/node-gyp/16.20.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/Users/god-logger/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/god-logger/Library/Caches/node-gyp/16.20.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/Users/god-logger/develop/360vr/node_modules/sharp',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! Traceback (most recent call last):
npm ERR! File "/Users/god-logger/node_modules/node-gyp/gyp/gyp_main.py", line 51, in <module>
npm ERR! sys.exit(gyp.script_main())
npm ERR! ^^^^^^^^^^^^^^^^^
npm ERR! File "/Users/god-logger/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 670, in script_main
npm ERR! return main(sys.argv[1:])
npm ERR! ^^^^^^^^^^^^^^^^^^
npm ERR! File "/Users/god-logger/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 662, in main
npm ERR! return gyp_main(args)
npm ERR! ^^^^^^^^^^^^^^
npm ERR! File "/Users/god-logger/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 629, in gyp_main
npm ERR! [generator, flat_list, targets, data] = Load(
npm ERR! ^^^^^
npm ERR! File "/Users/god-logger/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 150, in Load
npm ERR! result = gyp.input.Load(
npm ERR! ^^^^^^^^^^^^^^^
npm ERR! File "/Users/god-logger/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 3021, in Load
npm ERR! LoadTargetBuildFile(
npm ERR! File "/Users/god-logger/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 411, in LoadTargetBuildFile
npm ERR! build_file_data = LoadOneBuildFile(
npm ERR! ^^^^^^^^^^^^^^^^^
npm ERR! File "/Users/god-logger/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 239, in LoadOneBuildFile
npm ERR! build_file_contents = open(build_file_path, "rU").read()
npm ERR! ^^^^^^^^^^^^^^^^^^^^^^^^^^^
npm ERR! ValueError: invalid mode: 'rU' while trying to load binding.gyp
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onCpExit (/Users/god-logger/node_modules/node-gyp/lib/configure.js:351:16)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:293:12)
npm ERR! gyp ERR! System Darwin 22.4.0
npm ERR! gyp ERR! command "/usr/local/bin/node" "/Users/god-logger/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /Users/god-logger/develop/360vr/node_modules/sharp
npm ERR! gyp ERR! node -v v16.20.0
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in: /Users/god-logger/.npm/_logs/2023-05-03T15_13_59_941Z-debug-0.log
➜ 360vr
해결방안
- xcode-select --install
- brew install gcc
- brew install vips
이후
yarn install sharp
반응형
'자바스크립트 > Node JS' 카테고리의 다른 글
Slack API (bolt)를 활용한 Bot 만들기 (0) | 2023.08.28 |
---|---|
NPM 프로젝트 라이브러리 자동 최신버전 반영 방법 (0) | 2023.05.05 |
n을 활용한 다양한 Node.js 버전 관리 (0) | 2023.04.26 |