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
Einführung <br />Nicht jeder hat Zugang zu e...
Wenn der Umfang der Docker-Bereitstellung zunimmt...
Inhaltsverzeichnis Vorwort Nr.1 Ein Fokus Nr. 2 E...
Drei-Wege-Handshake-Phase Anzahl der Wiederholung...
Zuvor habe ich die Verwendung der charAt()-Method...
Wenn wir das Dialogfeld „Ordnereigenschaften“ in W...
Inhaltsverzeichnis Phänomen: Portnutzung: Rechtsc...
Inhaltsverzeichnis Sehen Sie sich dies an.$store....
Da ich MySQL installieren muss, zeichne ich den I...
Tatsächlich gibt es viele entsprechende Schreibme...
Der zu erzielende Effekt ist: Festes Vergrößern a...
Inhaltsverzeichnis 1. fürJedes() 2. arr.filter() ...
Inhaltsverzeichnis 1. Referenz-Plugins im Uniapp ...
1. Erstellen Sie eine Testtabelle Tabelle `mysql_...
Dieser Artikel erläutert anhand von Beispielen di...