NPM install fails on Windows

オープン
#346 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
javascript
領域
build-system

調査の方向性

npm install のエラーに示されている、husky install を実行する npm ライフサイクルスクリプトから始めます。そのスクリプトが Bash ではなく Windows cmd でどのように動作するかを確認し、その後、npm install bigscreen-player --save が --ignore-scripts を必要とせずに Windows 上で正常に完了することを検証します。

索引モデルが issue の本文から書いたものです。

説明

bug

Describe the bug
When running npm install bigscreen-player --save on Windows the following error appears:

$ npm install bigscreen-player --save
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c if [ -d .git/ ]; then husky install; fi
npm ERR! -d was unexpected at this time.

This was via Git Bash but as NPM runs via cmd the Bash -d directory exists check is unsupported.

Is the bug device specific?
Limited to Windows due to it's lack of bash script support.

Is this happening on Chrome?
N/A.

Is the bug consistenly reproducible?
Yes.

Have you seen this journey working before?
No, this was my first install of the package.

To Reproduce
Steps to reproduce the behavior:

  1. Open a Git Bash prompt on a Windows machine
  2. Run npm install bigscreen-player --save
  3. See error

Expected behavior
The package to install without any errors.

Screenshots
N/A

Device (please complete the following information):

  • Make/Model: Windows 10 Build 19045.4651
  • BSP Version 8.5.1

Additional context
Workaround found to allow install to complete found of adding --ignore-scripts to the command: npm install bigscreen-player --save --ignore-scripts but there may be other implications of doing this.

主要言語
JavaScript
スター
108
フォーク
18
平均マージ
1時間 30分
マージ済み PR(30日)
2

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

bbc/bigscreen-player のほかの issue

bbc/bigscreen-player の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。