2017-10-31 95 views
8

Nie mogę uruchomić żadnych poleceń npm install z powodu błędu, który pojawia się. Nie jestem pewien, co to znaczy:npm cordova błąd uniemożliwić instalację

npm ERR! path /Users/.../Projects/.../file:cordova-dist/tools/cordova-common-1.5.1.tgz 
npm ERR! code ENOENT 
npm ERR! errno -2 
npm ERR! syscall stat 
npm ERR! enoent ENOENT: no such file or directory, stat '/Users/.../Projects/.../file:cordova-dist/tools/cordova-common-1.5.1.tgz' 
npm ERR! enoent This is related to npm not being able to find a file. 
npm ERR! enoent 

Co mam zrobić, aby naprawić ten błąd?


Pełna Ślad:

To jest gadatliwy ślad przechowywane w folderze .log dla KMP

16 silly install generateActionsToTake 
17 silly diffTrees action count 5 
18 silly diffTrees update [email protected]:file:cordova-dist/tools/cordova-common-1.5.1.tgz 
19 silly diffTrees remove [email protected] 
20 silly diffTrees remove cordova 2 
21 silly diffTrees remove node-sass 2 
22 silly diffTrees remove npm-debug.log 
23 silly decomposeActions action count 18 
24 silly decomposeActions unbuild [email protected] 
25 silly decomposeActions remove [email protected] 
26 silly decomposeActions fetch [email protected]:file:cordova-dist/tools/cordova-common-1.5.1.tgz 
27 silly decomposeActions extract [email protected]:file:cordova-dist/tools/cordova-common-1.5.1.tgz 
28 silly decomposeActions preinstall [email protected]:file:cordova-dist/tools/cordova-common-1.5.1.tgz 
29 silly decomposeActions build [email protected]:file:cordova-dist/tools/cordova-common-1.5.1.tgz 
30 silly decomposeActions install [email protected]:file:cordova-dist/tools/cordova-common-1.5.1.tgz 
31 silly decomposeActions postinstall [email protected]:file:cordova-dist/tools/cordova-common-1.5.1.tgz 
32 silly decomposeActions finalize [email protected]:file:cordova-dist/tools/cordova-common-1.5.1.tgz 
33 silly decomposeActions refresh-package-json [email protected]:file:cordova-dist/tools/cordova-common-1.5.1.tgz 
34 silly decomposeActions unbuild [email protected] 
35 silly decomposeActions remove [email protected] 
36 silly decomposeActions unbuild cordova 2 
37 silly decomposeActions remove cordova 2 
38 silly decomposeActions unbuild node-sass 2 
39 silly decomposeActions remove node-sass 2 
40 silly decomposeActions unbuild npm-debug.log 
41 silly decomposeActions remove npm-debug.log 
42 silly install executeActions 
43 silly doSerial global-install 18 
44 verbose correctMkdir /Users/.../.npm/_locks correctMkdir not in flight; initializing 
45 verbose lock using /Users/.../.npm/_locks/staging-e07da16c2da6e71c.lock for /Users/.../Documents/Projects/.../node_modules/.staging 
46 silly doParallel extract 18 
47 silly extract [email protected]:file:cordova-dist/tools/cordova-common-1.5.1.tgz 
48 silly pacote trying [email protected]:file:cordova-dist/tools/cordova-common-1.5.1.tgz by hash: sha1-Z3DeDWIArW+Uoavok5tb2ezhOeM= 
49 silly pacote data for sha1-Z3DeDWIArW+Uoavok5tb2ezhOeM= not present. Using manifest. 
50 verbose unlock done using /Users/.../.npm/_locks/staging-e07da16c2da6e71c.lock for /Users/jeremylopez/Documents/Projects/.../node_modules/.staging 
51 warn @ionic-native/[email protected] requires a peer of @ionic-native/[email protected]^4.2.0 but none is installed. You must install peer dependencies yourself. 
52 warn [email protected] requires a peer of [email protected]>=5.0.0 but none is installed. You must install peer dependencies yourself. 
53 warn [email protected] requires a peer of @angular/[email protected]^2.3.0 but none is installed. You must install peer dependencies yourself. 
54 warn [email protected] requires a peer of @angular/[email protected]^2.3.0 but none is installed. You must install peer dependencies yourself. 
55 warn The package @types/node is included as both a dev and production dependency. 
56 verbose stack Error: ENOENT: no such file or directory, stat '/Users/.../Documents/Projects/.../file:cordova-dist/tools/cordova-common-1.5.1.tgz' 
+0

Czy sprawdziłeś ten https://stackoverflow.com/questions/20753550/enoent-no-such-file-or-directory –

+0

nadal otrzymujesz ten sam błąd. pokazana ścieżka to folder główny moich projektów, który nie ma żadnych pakietów bezpośrednio w środku. Idk, dlaczego szukał czegoś tam. –

+0

Wygląda jak stara wersja Cordova dla mnie. Widzę cordova 2, a cordova 7 jest najnowsza. Może ponownie zainstaluj cordova global: install -g cordova Upewnij się, że w twoim package.json nie ma cordova. –

Odpowiedz

1

Po zlokalizowaniu pliku powoduje problem, cordova-common. Udało mi się usunąć platformę Android, która spowodowała problem (ponieważ nie jest mi ona potrzebna) i mogłem ponownie uruchomić npm install bez awarii.