4
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Netskope の SSL/TLS Inspection が有効なプロキシ下で electron をインストールする

Posted at

Netskope の SSL/TLS インスペクション機能 によって、特定ドメインへの通信時にNetskope独自のサーバ証明書が使われてしまい、外部通信が必要な処理でエラーが発生するケースが存在する。

今回は、Windows環境において、playwright のリポジトリnpm ci を実行したところ、依存関係の electron のインストールスクリプト実行時にエラーが発生した。

ポイントは以下2点

プロキシを利用する設定

OSの証明書ストアを使用する設定

  • 前提:Netskope で利用する証明書がOSの証明書ストアにインストール(信頼)している
  • Node 23.8.0 より、--use-system-ca オプションをつけて node を実行することで、システムの証明書ストアを使うようになる機能が追加された。
    https://nodejs.org/ja/blog/release/v23.8.0#support-for-using-system-ca-certificates-store-on-macos-and-windows
  • node のオプションなので npm ci に直接渡すことはできない。そのため NODE_OPTIONS 環境変数を使ってオプションを有効化する。
NODE_OPTIONS=--use-system-ca npm ci

これで無事 playwright のリポジトリで npm ci を実行し、依存関係の electron をインストールすることができた。

4
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?