0

環境:

カタリナ 10.15.7

npm v5.5.1

ノード v8.9.3

ノード gyp v8.3.0

python #実行するpython -Vと 2.7.16 になりますが、実行すると

私は得る

gyp info find Python using Python version 3.8.3 found at "/Library/Frameworks/Python.framework/Versions/3.8/bin/python3"node-gyp は受け入れ可能なバージョンの python を見つけていると思いますが、これが問題なのでしょうか?

制約: ノード v8.9.3 と Catalina を使用する必要があります (アップグレードするスペースがありません)。

私が試したこと:

  1. 走った

xcode-select --install

しかし、私はすでにそれを持っていました。だから私は走った

sudo xcode-select --switch /Library/Developer/CommandLineTools

私は走りましたがcurl -sL https://github.com/nodejs/node-gyp/raw/master/macOS_Catalina_acid_test.sh | bash 、うまくいきました。

  1. xcode-selectをアンインストールして再インストールし、上記のプロセスを再度実行して同様の結果を得たので、これではないと思います。
  2. node-gyp をグローバルにアンインストールして再インストールしました。次に、 https://github.com/nodejs/node-gyp/blob/master/macOS_Catalina.mdnpm_config_node_gyp=<path to node-gyp>に従ってnpm 構成の環境変数を設定し、 それが正しいことを確認しました。これを .bash-profile に入れ、新しいターミナルを開き、構成ファイルで確認しました。
  3. node_modules と package-lock.json を削除しようとしました。

実行中のスタック トレース

/Users/tristanshawnjohnson/.nvm/versions/node/v8.9.3/bin/node /Users/tristanshawnjohnson/.nvm/versions/node/v8.9.3/bin/node-gyp rebuild

gyp info it worked if it ends with ok
gyp info using node-gyp@8.3.0
gyp info using node@8.9.3 | darwin | x64
gyp info find Python using Python version 3.8.3 found at "/Library/Frameworks/Python.framework/Versions/3.8/bin/python3"
gyp ERR! UNCAUGHT EXCEPTION 
gyp ERR! stack TypeError [ERR_INVALID_ARG_TYPE]: The "original" argument must be of type function
gyp ERR! stack     at Object.promisify (internal/util.js:206:11)
gyp ERR! stack     at Object.<anonymous> (/Users/tristanshawnjohnson/.nvm/versions/node/v8.9.3/lib/node_modules/node-gyp/lib/install.js:15:29)
gyp ERR! stack     at Module._compile (module.js:635:30)
gyp ERR! stack     at Object.Module._extensions..js (module.js:646:10)
gyp ERR! stack     at Module.load (module.js:554:32)
gyp ERR! stack     at tryModuleLoad (module.js:497:12)
gyp ERR! stack     at Function.Module._load (module.js:489:3)
gyp ERR! stack     at Module.require (module.js:579:17)
gyp ERR! stack     at require (internal/module.js:11:18)
gyp ERR! stack     at Object.self.commands.(anonymous function) [as install] (/Users/tristanshawnjohnson/.nvm/versions/node/v8.9.3/lib/node_modules/node-gyp/lib/node-gyp.js:41:14)
gyp ERR! System Darwin 19.6.0
gyp ERR! command "/Users/tristanshawnjohnson/.nvm/versions/node/v8.9.3/bin/node" "/Users/tristanshawnjohnson/.nvm/versions/node/v8.9.3/bin/node-gyp" "rebuild"
gyp ERR! cwd /Users/tristanshawnjohnson/Work/lms-spa
gyp ERR! node -v v8.9.3
gyp ERR! node-gyp -v v8.3.0
gyp ERR! Node-gyp failed to build your package

そして、ここにあるのはランニング用です

npm install


> node-expat@2.3.16 install /Users/tristanshawnjohnson/Work/lms-spa/node_modules/node-expat
> node-gyp rebuild

gyp ERR! UNCAUGHT EXCEPTION 
gyp ERR! stack TypeError [ERR_INVALID_ARG_TYPE]: The "original" argument must be of type function
gyp ERR! stack     at Object.promisify (internal/util.js:206:11)
gyp ERR! stack     at Object.<anonymous> (/Users/tristanshawnjohnson/.nvm/versions/node/v8.9.3/lib/node_modules/node-gyp/lib/install.js:15:29)
gyp ERR! stack     at Module._compile (module.js:635:30)
gyp ERR! stack     at Object.Module._extensions..js (module.js:646:10)
gyp ERR! stack     at Module.load (module.js:554:32)
gyp ERR! stack     at tryModuleLoad (module.js:497:12)
gyp ERR! stack     at Function.Module._load (module.js:489:3)
gyp ERR! stack     at Module.require (module.js:579:17)
gyp ERR! stack     at require (internal/module.js:11:18)
gyp ERR! stack     at Object.self.commands.(anonymous function) [as install] (/Users/tristanshawnjohnson/.nvm/versions/node/v8.9.3/lib/node_modules/node-gyp/lib/node-gyp.js:41:14)
gyp ERR! System Darwin 19.6.0
gyp ERR! command "/Users/tristanshawnjohnson/.nvm/versions/node/v8.9.3/bin/node" "/Users/tristanshawnjohnson/.nvm/versions/node/v8.9.3/bin/node-gyp" "rebuild"
gyp ERR! cwd /Users/tristanshawnjohnson/Work/lms-spa/node_modules/node-expat
gyp ERR! node -v v8.9.3
gyp ERR! node-gyp -v v8.3.0
gyp ERR! Node-gyp failed to build your package.
gyp ERR! Try to update npm and/or node-gyp and if it does not help file an issue with the package author.
npm WARN eslint-config-airbnb-base@11.3.1 requires a peer of eslint@^3.19.0 || ^4.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-import@2.7.0 requires a peer of eslint@2.x - 4.x but none is installed. You must install peer dependencies yourself.
npm WARN mongoose-delete@0.4.0 requires a peer of mongoose@4.x but none is installed. You must install peer dependencies yourself.
npm WARN sinon-mongoose@2.1.1 requires a peer of sinon@2.1 - 4 but none is installed. You must install peer dependencies yourself.

npm ERR! code ELIFECYCLE
npm ERR! errno 7
npm ERR! node-expat@2.3.16 install: `node-gyp rebuild`
npm ERR! Exit status 7
npm ERR! 
npm ERR! Failed at the node-expat@2.3.16 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/tristanshawnjohnson/.npm/_logs/2021-10-28T22_00_44_615Z-debug.log

申し訳ありませんが、これを理解できませんでした。stackoverflow で解決策を見つけることができなかったのはこれが初めてです。どんな助けでも大歓迎です。

4

0 に答える 0