Upgrade to Pro — share decks privately, control downloads, hide ads and more …

8年前のNode.jsを動かして分かった、npm installの裏側

8年前のNode.jsを動かして分かった、npm installの裏側

Avatar for Keisuke Ikeda

Keisuke Ikeda

October 12, 2026

More Decks by Keisuke Ikeda

Other Decks in Programming

Transcript

  1. 自己紹介 Keisuke Ikeda ・東京と関西(大阪&京都)の2拠点生活中 ・Maybe Software Engineer ・テックコミュニティに積極参加 - TSKaigi

    2025,2026 / フロカン関西 2025,2026 / ReactTokyoフェス 2026 スタッフ - TSKaigi 2025,2026 登壇 / フロカン関西 2026登壇 - 他にもテックイベントに学生時代から多数参加 ・フロカン2018,2019、フロカン福岡2018,2019が私のconference origin @ike̲keichan 02/27
  2. エラーと向き合う ⚠禁断の1行⚠ ・書き換えたのは、Node.js 6 の「どの macOS 向けにビルドするか」設定 - 10.7 のまま

    → Clang が古い libstdc++ を探しに行って失敗 - 13.4 に変更 → Clang が今の Mac にある libc++ を使うようになりビルド成功 ・諸事情があり強行しましたがやったらダメです。 @ike̲keichan 17/27
  3. 参考文献 ソースコード ・Node.js v6.11.4: common.gypi(MACOSX̲DEPLOYMENT̲TARGET) https://github.com/nodejs/node/blob/v6.11.4/common.gypi#L368 ・node-gyp 3.4.0: lib/con gure.js(python2

    の要求) https://github.com/nodejs/node/blob/v6.11.4/deps/npm/node̲modules/node-gyp/lib/ con gure.js#L30 ・gyp: xcode̲emulation.py(Xcode バージョンの判定) https://github.com/nodejs/node/blob/v6.11.4/deps/npm/node̲modules/node-gyp/gyp/ pylib/gyp/xcode̲emulation.py#L1265 25/27 fi fi @ike̲keichan
  4. 参考文献 公式ドキュメント・リリースノート(1/2) ・Node.js「Node v6.11.4 (LTS)」, Node.js Blog, 2017年, https://nodejs.org/en/blog/release/v6.11.4 ・Node.js「Node

    v16.0.0 (Current)」, Node.js Blog, 2021年, https://nodejs.org/en/blog/release/v16.0.0 ・npm「v5.0.0」, GitHub Releases, 2017年, https://github.com/npm/npm/releases/tag/v5.0.0 @ike̲keichan 26/27
  5. 参考文献 公式ドキュメント・リリースノート(2/2) ・Apple「Xcode 10 Release Notes」, Apple Developer Documentation, 2018年,

    https://developer.apple.com/documentation/xcode-release-notes/xcode-10-releasenotes ・Apple「About the Rosetta Translation Environment」, Apple Developer Documentation, https://developer.apple.com/documentation/apple-silicon/about-the-rosettatranslation-environment @ike̲keichan 27/27