Я возрождаю старый проект Node, .nvmr c был v5.1.0
. Я использовал nvm
, чтобы начать использовать v12.16.1, и теперь, когда я запускаю npx i
или npm i
, я получаю следующий вывод:
https://gist.github.com/ruevaughn/1d465d509aa04800954d43da4ef581c7
Основное сообщение, которое я могу извлечь из этой сути, здесь:
18 warnings and 18 errors generated.
make: *** [Release/obj.target/bcrypt_lib/src/bcrypt_node.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/cjensen/.nvm/versions/node/v12.16.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:311:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Darwin 19.2.0
gyp ERR! command "/Users/cjensen/.nvm/versions/node/v12.16.1/bin/node" "/Users/cjensen/.nvm/versions/node/v12.16.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/cjensen/projects/inusa/inusa-api/node_modules/bcrypt
gyp ERR! node -v v12.16.1
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
npm WARN eslint-config-airbnb@12.0.0 requires a peer of eslint-plugin-import@^1.16.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-config-airbnb-base@8.0.0 requires a peer of eslint-plugin-import@^1.16.0 but none is installed. You must install peer dependencies yourself.
npm WARN The package loopback-testing-helpers is included as both a dev and production dependency.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bcrypt@0.8.7 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt@0.8.7 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/cjensen/.npm/_logs/2020-02-25T20_43_56_990Z-debug.log
Вот 2020-02-25T20_43_56_990Z-debug.log
I попытался запустить node-gyp
вручную и получил следующую ошибку:
~/p/inu/inusa-api update-node +1 !1 ?1 ▓▒░ node-gyp rebuild ░▒▓ ✔ 30m 58s 12.16.1 14:41:49
gyp info it worked if it ends with ok
gyp info using node-gyp@6.1.0
gyp info using node@12.16.1 | darwin | x64
gyp info find Python using Python version 3.7.5 found at "/usr/local/opt/python/bin/python3.7"
gyp info spawn /usr/local/opt/python/bin/python3.7
gyp info spawn args [
gyp info spawn args '/Users/cjensen/.nvm/versions/node/v5.1.0/lib/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/cjensen/projects/inusa/inusa-api/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/cjensen/.nvm/versions/node/v5.1.0/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/cjensen/Library/Caches/node-gyp/12.16.1/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/cjensen/Library/Caches/node-gyp/12.16.1',
gyp info spawn args '-Dnode_gyp_dir=/Users/cjensen/.nvm/versions/node/v5.1.0/lib/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/cjensen/Library/Caches/node-gyp/12.16.1/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/cjensen/projects/inusa/inusa-api',
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: binding.gyp not found (cwd: /Users/cjensen/projects/inusa/inusa-api) while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/Users/cjensen/.nvm/versions/node/v5.1.0/lib/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (events.js:311:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Darwin 19.2.0
gyp ERR! command "/Users/cjensen/.nvm/versions/node/v12.16.1/bin/node" "/Users/cjensen/.nvm/versions/node/v5.1.0/bin/node-gyp" "rebuild"
gyp ERR! cwd /Users/cjensen/projects/inusa/inusa-api
gyp ERR! node -v v12.16.1
gyp ERR! node-gyp -v v6.1.0
gyp ERR! not ok
Видимо, это не нормально. Таким образом, мне показалось, что node-gyp был скомпилирован с узлом v6.10 (я сначала обновил с 5 до 6, прежде чем решил «go для него»).
Когда я делаю
which -a node-gyp
/Users/cjensen/.nvm/versions/node/v5.1.0/bin/node-gyp
Я вижу, что узел V5.1.0 - это путь, к которому он в данный момент настроен. Что я делаю не так?