Как устанавливать любые библиотеки npm на apple silicon?

Здравствуйте недавно приобрел macbook на чипе m1 и уже несколько часов сижу и пытаюсь установить разные библиотеки для проекта, некоторые скачиваются а некоторые нет, например тот же brain.js не получается скачать, у меня такое чувство что я жестко где то туплю,
Вот полный лог при попытке скачать тот же brain.js

npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! code 1
npm ERR! path /Users/dimash/Documents/GitHub/bsc-speech-to-text/node_modules/gl
npm ERR! command failed
npm ERR! command sh -c prebuild-install || node-gyp rebuild
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.13.0 | darwin | arm64
npm ERR! gyp info find Python using Python version 3.9.13 found at "/opt/homebrew/opt/python@3.9/bin/python3.9"
npm ERR! (node:93626) [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 /opt/homebrew/opt/python@3.9/bin/python3.9
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/Users/dimash/Documents/GitHub/bsc-speech-to-text/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/dimash/Documents/GitHub/bsc-speech-to-text/node_modules/gl/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/dimash/Documents/GitHub/bsc-speech-to-text/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/dimash/Library/Caches/node-gyp/16.13.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/dimash/Library/Caches/node-gyp/16.13.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/Users/dimash/Documents/GitHub/bsc-speech-to-text/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/Users/dimash/Library/Caches/node-gyp/16.13.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/Users/dimash/Documents/GitHub/bsc-speech-to-text/node_modules/gl',
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! /bin/sh: python: command not found
npm ERR! gyp: Call to 'python commit_id.py check ..' returned exit status 127 while in angle/src/angle.gyp. while loading dependencies of binding.gyp 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/dimash/Documents/GitHub/bsc-speech-to-text/node_modules/node-gyp/lib/configure.js:351:16)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Darwin 21.4.0
npm ERR! gyp ERR! command "/Users/dimash/.nvm/versions/node/v16.13.0/bin/node" "/Users/dimash/Documents/GitHub/bsc-speech-to-text/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /Users/dimash/Documents/GitHub/bsc-speech-to-text/node_modules/gl
npm ERR! gyp ERR! node -v v16.13.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:
npm ERR!     /Users/dimash/.npm/_logs/2022-07-16T18_26_34_717Z-debug.log


я уже пробовал: переустанавливать xcode line tools, устанавливать vips и что то еще похожее, установил rosetta, и делал еще кучу манипуляций описанные в разных issues github с похожими проблемами

единственное что решило это проблему это установка node версии 8.0.0 но как вы сами понимаете по моему это не решение

помогите плз, что вам помогло или хоть наводку какую то пожалуйста
  • Вопрос задан
  • 91 просмотр
Пригласить эксперта
Ответы на вопрос 1
xwjkka
@xwjkka
я пытаюсь...
наверное стоит обновить uuid: npm install uuid@latest
можно попробовать удалить package.json.lock и переустановить npm: npm install
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы