Detaillierte Erläuterung der Lösung für npm ls-Fehler, die durch das fsevents-Modul unter Linux verursacht werden

Detaillierte Erläuterung der Lösung für npm ls-Fehler, die durch das fsevents-Modul unter Linux verursacht werden

Es gibt ein auf dem Mac entwickeltes Projekt, das Paket npm i ist installiert und alles ist normal;

Setzen Sie dieses Projekt auf einen Linux-Rechner, installieren Sie das Paket npm i und melden Sie eine Reihe von Warnungen:

npm WARN optional – OPTIONALE ABHÄNGIGKEIT ÜBERSPRINGEN: fsevents@^1.2.7 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup ÜBERSPRINGEN OPTIONALER ABHÄNGIGKEIT: Nicht unterstützte Plattform für [email protected]: gesucht {"os":"darwin","arch":"any"} (aktuell: {"os":"linux","arch":"x64"})
npm WARN [email protected] Keine Beschreibung
npm WARN [email protected] Kein Repository-Feld.
npm WARN optional. OPTIONALE ABHÄNGIGKEIT ÜBERSPRINGEN: [email protected] (node_modules/fsevents/node_modules/abbrev):
npm WARN enoent ÜBERSPRINGEN OPTIONALER ABHÄNGIGKEIT: ENOENT: keine solche Datei oder kein solches Verzeichnis, umbenennen „/root/2019/0403/node_modules/fsevents/node_modules/abbrev“ -> „/root/2019/0403/node_modules/fsevents/node_modules/.abbrev.DELETE“
npm WARN optional. OPTIONALE ABHÄNGIGKEIT ÜBERSPRINGEN: [email protected] (node_modules/fsevents/node_modules/ansi-regex):
npm WARN enoent ÜBERSPRINGEN OPTIONALER ABHÄNGIGKEIT: ENOENT: keine solche Datei oder kein solches Verzeichnis, umbenennen „/root/2019/0403/node_modules/fsevents/node_modules/ansi-regex“ -> „/root/2019/0403/node_modules/fsevents/node_modules/.ansi-regex.DELETE“
npm WARN optional. OPTIONALE ABHÄNGIGKEIT ÜBERSPRINGEN: [email protected] (node_modules/fsevents/node_modules/aproba):
npm WARN enoent ÜBERSPRINGEN OPTIONALER ABHÄNGIGKEIT: ENOENT: keine solche Datei oder kein solches Verzeichnis, umbenennen „/root/2019/0403/node_modules/fsevents/node_modules/aproba“ -> „/root/2019/0403/node_modules/fsevents/node_modules/.aproba.DELETE“
npm WARN optional – OPTIONALE ABHÄNGIGKEIT ÜBERSPRINGEN: [email protected] (node_modules/fsevents/node_modules/balanced-match):
npm WARN enoent ÜBERSPRINGEN OPTIONALER ABHÄNGIGKEIT: ENOENT: keine solche Datei oder kein solches Verzeichnis, umbenennen „/root/2019/0403/node_modules/fsevents/node_modules/balanced-match“ -> „/root/2019/0403/node_modules/fsevents/node_modules/.balanced-match.DELETE“
npm WARN optional. OPTIONALE ABHÄNGIGKEIT ÜBERSPRINGEN: [email protected] (node_modules/fsevents/node_modules/chownr):
npm WARN enoent ÜBERSPRINGEN OPTIONALER ABHÄNGIGKEIT: ENOENT: keine solche Datei oder kein solches Verzeichnis, umbenennen „/root/2019/0403/node_modules/fsevents/node_modules/chownr“ -> „/root/2019/0403/node_modules/fsevents/node_modules/.chownr.DELETE“
npm WARN optional. OPTIONALE ABHÄNGIGKEIT ÜBERSPRINGEN: [email protected] (node_modules/fsevents/node_modules/code-point-at):
npm WARN enoent ÜBERSPRINGEN OPTIONALER ABHÄNGIGKEIT: ENOENT: keine solche Datei oder kein solches Verzeichnis, umbenennen „/root/2019/0403/node_modules/fsevents/node_modules/code-point-at“ -> „/root/2019/0403/node_modules/fsevents/node_modules/.code-point-at.DELETE“
...

Bei der Ausführung von npm ls gibt es viele UNMET OPTIONAL DEPENDENCY-Module und am Ende werden viele Fehler gemeldet:

│ ├── [email protected] dedupliziert
│ ├── [email protected] dedupliziert
│ ├── [email protected] dedupliziert
│ └─┬ [email protected]
│ └── [email protected]
├─┬ UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT [email protected]
│ ├── [email protected]
│ └─┬ UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT [email protected]
│ ├── UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT [email protected]
│ ├─┬ UNERFÜLLTE ABHÄNGIGKEIT [email protected]
│ │ └── UNERFÜLLTE ABHÄNGIGKEIT [email protected]
│ ├─┬ UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT [email protected]
│ │ ├─┬ UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT [email protected]
│ │ │ └── UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT [email protected]
│ │ ├─┬ UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT [email protected]
│ │ │ └── UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT [email protected]
│ │ └── UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT [email protected]
│ ├─┬ UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT [email protected]
│ │ ├── UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT [email protected]
│ │ └─┬ UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT [email protected]
│ │ ├── UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT [email protected]
│ │ └── UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT [email protected]
│ ├─┬ UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT [email protected]
│ │ ├─┬ UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT [email protected]
│ │ │ └─┬ UNERFÜLLTE ABHÄNGIGKEIT [email protected]
│ │ │ └─┬ UNERFÜLLTE ABHÄNGIGKEIT [email protected]
│ │ │ ├── UNERFÜLLTE ABHÄNGIGKEIT [email protected]
│ │ │ └── UNERFÜLLTE ABHÄNGIGKEIT [email protected]
│ │ └── UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT [email protected]
│ ├─┬ UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT [email protected]
│ │ ├─┬ UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT sind wir schon [email protected]
│ │ │ ├── UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT [email protected]
│ │ │ └─┬ UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT [email protected]
│ │ │ ├── UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT [email protected]
│ │ │ ├── UNERFÜLLTE ABHÄNGIGKEIT [email protected]
│ │ │ ├── UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT [email protected]
│ │ │ ├── UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT [email protected]
│ │ │ ├── UNERFÜLLTE ABHÄNGIGKEIT [email protected]
│ │ │ ├─┬ UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT [email protected]
│ │ │ │ └── UNERFÜLLTE ABHÄNGIGKEIT [email protected]
│ │ │ └── UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT [email protected]
│ │ ├── UNERFÜLLTE ABHÄNGIGKEIT [email protected]
│ │ ├─┬ UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT [email protected]
│ │ │ ├── UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT [email protected]
│ │ │ ├── UNERFÜLLTE ABHÄNGIGKEIT [email protected]
│ │ │ ├── UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT [email protected]
│ │ │ ├── UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT [email protected]
│ │ │ ├── UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT [email protected]
│ │ │ ├─┬ UNERFÜLLTE ABHÄNGIGKEIT [email protected]
│ │ │ │ ├── UNERFÜLLTE ABHÄNGIGKEIT Codepunkt [email protected]
│ │ │ │ ├─┬ UNERFÜLLTE ABHÄNGIGKEIT [email protected]
│ │ │ │ │ └── UNERFÜLLTE ABHÄNGIGKEIT Nummer ist [email protected]
│ │ │ │ └── UNERFÜLLTE ABHÄNGIGKEIT [email protected]
│ │ │ ├─┬ UNERFÜLLTE ABHÄNGIGKEIT [email protected]
│ │ │ │ └── UNERFÜLLTE ABHÄNGIGKEIT [email protected]
│ │ │ └─┬ UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT [email protected]
│ │ │ └── UNERFÜLLTE ABHÄNGIGKEIT [email protected]
│ │ └── UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT [email protected]
│ ├─┬ UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT [email protected]
│ │ ├── UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT [email protected]
│ │ ├── UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT [email protected]
│ │ ├── UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT [email protected]
│ │ └── UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT [email protected]
│ ├─┬ UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT [email protected]
│ │ └─┬ UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT [email protected]
│ │ ├── UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT [email protected]
│ │ ├─┬ UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT [email protected]
│ │ │ ├── UNERFÜLLTE ABHÄNGIGKEIT [email protected]
│ │ │ └── UNERFÜLLTE ABHÄNGIGKEIT [email protected]
│ │ ├── UNERFÜLLTE ABHÄNGIGKEIT [email protected]
│ │ ├── UNERFÜLLTE ABHÄNGIGKEIT [email protected]
│ │ ├─┬ UNERFÜLLTE ABHÄNGIGKEIT [email protected]
│ │ │ └── UNERFÜLLTE ABHÄNGIGKEIT [email protected]
│ │ └── UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT Pfad ist [email protected]
│ ├── UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT [email protected]
│ └─┬ UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT [email protected]
│ ├── UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT [email protected]
│ ├─┬ UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT [email protected]
│ │ └── UNERFÜLLTE ABHÄNGIGKEIT [email protected]
│ ├─┬ UNERFÜLLTE ABHÄNGIGKEIT [email protected]
│ │ ├── UNERFÜLLTE ABHÄNGIGKEIT [email protected]
│ │ └── UNERFÜLLTE ABHÄNGIGKEIT [email protected]
│ ├─┬ UNERFÜLLTE OPTIONALE ABHÄNGIGKEIT [email protected]
│ │ └── UNERFÜLLTE ABHÄNGIGKEIT [email protected]
│ ├── UNERFÜLLTE ABHÄNGIGKEIT [email protected]
│ ├── UNERFÜLLTE ABHÄNGIGKEIT [email protected]
│ └── UNERFÜLLTE ABHÄNGIGKEIT [email protected]
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected] dedupliziert
│ └── [email protected]
├── [email protected]
├─┬ ist-binä[email protected]
│ └── binäre [email protected]
├─┬ [email protected]
│ └── [email protected]
├── [email protected]
├── Pfad ist [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected] dedupliziert
│ └─┬ lesbarer [email protected]
│ ├── [email protected]
│ ├── [email protected] dedupliziert
│ ├── [email protected]
│ ├── [email protected]
│ ├── sicherer [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected] dedupliziert
│ └── [email protected]
└── [email protected]
npm FEHLER! fehlt: [email protected], wird benötigt von [email protected]
npm FEHLER! fehlt: [email protected], wird benötigt von [email protected]
npm FEHLER! fehlt: [email protected], wird benötigt von [email protected]
npm FEHLER! fehlt: [email protected], wird benötigt von [email protected]
npm FEHLER! fehlt: [email protected], erforderlich für [email protected]
npm FEHLER! fehlt: [email protected], erforderlich für [email protected]
npm FEHLER! fehlt: [email protected], wird benötigt von [email protected]
npm FEHLER! fehlt: [email protected], wird benötigt von [email protected]
npm FEHLER! fehlt: [email protected], wird benötigt von [email protected]
npm FEHLER! fehlt: [email protected], wird benötigt von [email protected]
npm FEHLER! fehlt: [email protected], wird benötigt von [email protected]
npm FEHLER! fehlt: [email protected], erforderlich für [email protected]
npm FEHLER! fehlt: [email protected], wird benötigt von [email protected]
npm FEHLER! fehlt: [email protected], erforderlich für [email protected]
npm FEHLER! fehlt: [email protected], erforderlich für [email protected]
npm FEHLER! fehlt: [email protected], wird benötigt für [email protected]
npm FEHLER! fehlt: [email protected], erforderlich für [email protected]
npm FEHLER! fehlt: [email protected], wird benötigt von [email protected]
npm FEHLER! fehlt: [email protected], wird benötigt von [email protected]
npm FEHLER! fehlt: [email protected], wird benötigt von [email protected]
npm FEHLER! fehlt: [email protected], wird benötigt von [email protected]
npm FEHLER! fehlt: [email protected], wird benötigt von [email protected]
npm FEHLER! fehlt: [email protected], wird benötigt von [email protected]
npm FEHLER! fehlt: [email protected], wird benötigt von [email protected]
npm FEHLER! fehlt: [email protected], wird benötigt von [email protected]
npm FEHLER! fehlt: [email protected], wird benötigt von [email protected]
npm FEHLER! fehlt: [email protected], wird benötigt von [email protected]
npm FEHLER! fehlt: [email protected], wird von [email protected] benötigt
npm FEHLER! fehlt: [email protected], wird benötigt von [email protected]
npm FEHLER! fehlt: [email protected], wird benötigt von [email protected]
npm FEHLER! fehlt: [email protected], wird benötigt von [email protected]
npm FEHLER! fehlt: [email protected], wird benötigt von [email protected]
npm FEHLER! fehlt: [email protected], wird benötigt von [email protected]

Eine sorgfältige Beobachtung ergab, dass die Module UNMET OPTIONAL DEPENDENCY und npm ERR dieselben Module sind und auch diejenigen, die während der Installation Warnungen melden.

Bei genauerem Hinsehen wird deutlich, dass es sich hierbei um Module handelt, von denen fsevents abhängt.

fsevents kann nur unter macOS installiert werden und nicht auf Linux-Systemen. Das Modul fsevents wird unter Linux übersprungen und die Module, von denen fsevents abhängt, werden nicht installiert.

Dies ist tatsächlich ein Fehler in npm. npm i meldet eine Warnung und npm ls meldet einen Fehler, was inkonsistent ist und leicht zu Missverständnissen führen kann.

Derzeit tritt dieses Problem unabhängig davon auf, welche Version von npm verwendet wird, und npm i --no-optional kann dieses Problem nicht lösen.

Diese Fehler beeinträchtigen den normalen Betrieb des Projekts nicht, da Linux keine fsevents erfordert.

Wenn Sie npm Err nicht sehen möchten, können Sie die Installation mit npm i -f erzwingen. Während der Installation wird keine Warnung angezeigt. Führen Sie nach der Installation npm ls aus, um Folgendes anzuzeigen:

Sauber, keine Fehler.

Mein Projekt ist Chokidar, ein Modul, das von fsevents abhängt, und Chokidar hängt von Browser-Sync, Webpack usw. ab.

Das Obige ist der vollständige Inhalt dieses Artikels. Ich hoffe, er wird für jedermanns Studium hilfreich sein. Ich hoffe auch, dass jeder 123WORDPRESS.COM unterstützen wird.

Das könnte Sie auch interessieren:
  • Spielen Sie mit der Connect-Funktion mit Timeout in Linux
  • Erläuterung der Installation und Konfiguration zum Erstellen einer Go-Umgebung unter Linux
  • Zusammenfassung der Verwendung des Linux-Befehls „cut“
  • Detaillierte Erläuterung der Ein- und Ausgabeverwaltung des Linux-Systems und der allgemeinen Funktionen von vim
  • Linux-Shell - Beispiel zum Testen von Dateisystemattributen durch Identifizierung
  • Verschiedene Beurteilungen von if in der Linux-Shell
  • Erklärung zur Verwendung von Pushd, Popd und Dirs in der Linux-Shell
  • So drucken Sie Schriftarten und Hintergründe in verschiedenen Farben in der Linux-Shell-Konsole
  • Zeigen Sie die abhängigen Bibliotheken von so oder ausführbaren Programmen unter Linux an
  • Beispielerklärung der Alarmfunktion in Linux

<<:  Master-Slave-Konfiguration für die synchrone Replikation einer MySQL-Datenbank unter Linux

>>:  Kommunikation zwischen übergeordneten und untergeordneten Komponenten in Vue und Verwendung von Sync zum Synchronisieren der Daten übergeordneter und untergeordneter Komponenten

Artikel empfehlen

Detaillierte Erklärung zur Verwendung selbstverschachtelter Vue-Baumkomponenten

In diesem Artikel erfahren Sie, wie Sie die selbs...

Zeitleistenimplementierungsmethode basierend auf ccs3

In Webprojekten nutzen wir häufig die Zeitleisten...

Lösung für 1067, wenn Mysql in Windows startet

Ich habe erst vor ein paar Tagen mit der Arbeit b...

Vue und React im Detail

Inhaltsverzeichnis 1. Panorama II. Hintergrund 1....

MySQL 5.7-Bereitstellung und Remotezugriffskonfiguration unter Linux

Vorwort: Vor Kurzem werde ich mit meinen Partnern...

Empfehlen Sie einen coolen blinkenden Alarmknopf

Die Wirkung ist wie folgt: Der Code lautet wie fo...

Löschen von zwei Bildern mit derselben ID im Docker

Als ich heute einen Docker-Container erstellt hab...

Detaillierte Erläuterung der drei Möglichkeiten zum Importieren von CSS-Dateien

Es gibt drei Möglichkeiten, CSS einzuführen: Inli...

So geben Sie Speicherplatz unter CentOS 6 oder CentOS 7 frei

Nachfolgend finden Sie die Schnellbefehle zum Fre...