2017-02-15 4 views
0

Beim Starten des npm es unter Fehler geben, so scheint es nicht in der Lage ist, die JSON-Datei zu finden, überprüfen freundlich unten Details zusammen mit Protokolldateinpm Startbefehl kann nicht JSON-Datei in npm v3.10.8 finden

simplymacs-MacBook-Air-2:hackoregon_component_library 
MelissaKeith$ npm "start" 
npm ERR! Darwin 15.6.0 
npm ERR! argv "/usr/local/Cellar/node/6.8.1/bin/node" "/usr/local/bin/npm" "start" 
npm ERR! node v6.8.1 
npm ERR! npm v3.10.8 
npm ERR! path /Users/MelissaKeith/package.json 
npm ERR! code ENOENT 
npm ERR! errno -2 
npm ERR! syscall open 

npm ERR! enoent ENOENT: no such file or directory, open '/Users/MelissaKeith/package.json' 
npm ERR! enoent ENOENT: no such file or directory, open '/Users/MelissaKeith/package.json' 
npm ERR! enoent This is most likely not a problem with npm itself 
npm ERR! enoent and is related to npm not being able to find a file. 
npm ERR! enoent 
npm ERR! Please include the following file with any support request: 
npm ERR!  /Users/MelissaKeith/hackoregon_component_library/npm-debug.log 

npm-debug.log

0 info it worked if it ends with ok 
1 verbose cli [ '/usr/local/Cellar/node/6.8.1/bin/node', 
1 verbose cli '/usr/local/bin/npm', 
1 verbose cli 'start' ] 
2 info using [email protected] 
3 info using [email protected] 
4 verbose config Skipping project config: /Users/MelissaKeith/.npmrc. (matches userconfig) 
5 verbose stack Error: ENOENT: no such file or directory, open '/Users/MelissaKeith/package.json' 
5 verbose stack  at Error (native) 
6 verbose cwd /Users/MelissaKeith/hackoregon_component_library 
7 error Darwin 15.6.0 
8 error argv "/usr/local/Cellar/node/6.8.1/bin/node" "/usr/local/bin/npm" "start" 
9 error node v6.8.1 
10 error npm v3.10.8 
11 error path /Users/MelissaKeith/package.json 
12 error code ENOENT 
13 error errno -2 
14 error syscall open 
15 error enoent ENOENT: no such file or directory, open '/Users/MelissaKeith/package.json' 
16 error enoent ENOENT: no such file or directory, open '/Users/MelissaKeith/package.json' 
16 error enoent This is most likely not a problem with npm itself 
16 error enoent and is related to npm not being able to find a file. 
17 verbose exit [ -2, true ] 
+1

Gibt es eine 'package.json' Datei in dem Verzeichnis, in dem' npm start' läuft? – carebdayrvis

+0

Wo ist dein 'package.json'? – jiyinyiyong

+0

Es gibt eine package.json-Datei und ihre in der Hauptdatei des Verzeichnisses – Melissa

Antwort

0

hatte ich ein sehr ähnliches Problem. Das Entfernen des gesamten node_modules-Ordners und die Neuinstallation funktionierten für mich.Dieses Problem tritt auf, wenn Sie ein altes Modul installieren (wie in Ihrer package.json geschrieben), aber es ist nicht auf git verfügbar, da es in seiner Version aktualisiert wurde:

um dieses Problem zu lösen.

rm -rf node_modules 
npm install 
+0

Wie würde ich überprüfen, ob mein Modul mit dem GitHub veraltet war? Und was meinst du mit node_module in dieser Situation? – Melissa

+0

simplymacs-MacBook-Air-2: hackoregon_component_library MelissaKeith $ rm -rf node_modules simplymacs-MacBook-Air-2: hackoregon_component_library MelissaKeith $ npm installieren npm WARN ENOENT ENOENT: keine solche Datei oder das Verzeichnis, offen ‚/ Users/MelissaKeith/Paket .json ' npm WARN MelissaKeith Keine Beschreibung npm WARN MelissaKeith Kein Repository-Feld. npm WARN MelissaKeith Keine README-Daten npm WARN MelissaKeith Kein Lizenzfeld. – Melissa

+0

gibt es ein Modul 'npm-check', welches nach veralteten, falschen und ungenutzten Abhängigkeiten sucht. https://github.com/dylang/npm-check –