NPM install fails on Windows

Aperta
#346 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
javascript
Ambito
build-system

Direzione di ricerca

Iniziate dallo script del ciclo di vita di npm che esegue husky install, come mostrato nell’errore di npm install. Verificate il comportamento dello script in Windows cmd invece che in Bash, quindi verificate che npm install bigscreen-player --save venga completato correttamente su Windows senza richiedere --ignore-scripts.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
JavaScript
Stelle
108
Fork
18
Merge medio
1h 30m
PR unite (30g)
2

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di bbc/bigscreen-player

Tutte le issue di bbc/bigscreen-player

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.