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: └─┬ [email protected] └── [email protected] 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:
|
<<: Master-Slave-Konfiguration für die synchrone Replikation einer MySQL-Datenbank unter Linux
1. Was sind die Vorlagen für ASP.NET-Webanwendunge...
1. Vorteile der Vorkompilierung Wir haben alle di...
Wenn der Benutzer sich abgemeldet hat und im Brows...
Mysql mehrere unabhängige Tabellen Abfragedaten u...
In diesem Artikel möchten wir eine Sammlung von 2...
KVM steht für Kernel-based Virtual Machine und is...
Hintergrund Kürzlich wollte ein Leiter, dass wir ...
Container-Lebenszyklus Der Lebenszyklus einer Con...
Inhaltsverzeichnis 1. Einführung in die PID-Datei...
Binäre MySQL-Installationsmethode Laden Sie mysql...
<br />Originaltext: http://research.microsof...
Einführung in die Positionierung in CSS position ...
Zum Beginn des neuen Jahres möchte ich meinen Fre...
Syntax: <marquee> …</marquee> Mithilfe...
1. Schreiben Sie das Dockerfile (1) Klicken Sie m...