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
In diesem Artikel erfahren Sie, wie Sie die selbs...
Mybatis Paging-Plugin pageHelper - ausführliche E...
In Webprojekten nutzen wir häufig die Zeitleisten...
Inhaltsverzeichnis 1. MySQL herunterladen 1.1 Her...
Abschluss: Wenn in einer Multithread-Umgebung ein...
Inhaltsverzeichnis 1. CentOS7+MySQL8.0, Yum-Quell...
Inhaltsverzeichnis Vorwort Lösung Konkrete Umsetz...
Wenn ein Div gleichzeitig Hintergrundfarbe und Hi...
Ich habe erst vor ein paar Tagen mit der Arbeit b...
Inhaltsverzeichnis 1. Panorama II. Hintergrund 1....
Vorwort: Vor Kurzem werde ich mit meinen Partnern...
Die Wirkung ist wie folgt: Der Code lautet wie fo...
Als ich heute einen Docker-Container erstellt hab...
Es gibt drei Möglichkeiten, CSS einzuführen: Inli...
Nachfolgend finden Sie die Schnellbefehle zum Fre...