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

Häufige Fragen und Antworten im Vorstellungsgespräch für Stellen als Webdesigner

1. Was sind die Vorlagen für ASP.NET-Webanwendunge...

MySQL-Vorkompilierung in einem Artikel verstehen

1. Vorteile der Vorkompilierung Wir haben alle di...

So fragen Sie Daten aus mehreren unabhängigen Tabellen und Paging in MySQL ab

Mysql mehrere unabhängige Tabellen Abfragedaten u...

20 CSS-Codierungstipps für mehr Effizienz (sortiert)

In diesem Artikel möchten wir eine Sammlung von 2...

Erstellen einer KVM-Virtualisierungsplattform auf CentOS7 (drei Möglichkeiten)

KVM steht für Kernel-based Virtual Machine und is...

Detaillierte Erklärung von PID und Socket in MySQL

Inhaltsverzeichnis 1. Einführung in die PID-Datei...

Rückblick auf die besten Webdesign-Arbeiten 2012 [Teil 1]

Zum Beginn des neuen Jahres möchte ich meinen Fre...

Lassen Sie Ihren Text mit dem Marquee-Attribut in HTML tanzen

Syntax: <marquee> …</marquee> Mithilfe...