8
Tôi không thể chạy bất kỳ lệnh npm install
nào do lỗi xuất hiện. Tôi không chắc ý nghĩa của nó là gì:lỗi npm cordova ngăn chặn cài đặt
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
Tôi phải làm gì để khắc phục lỗi?
Full Trace:
Đây là dấu vết tiết được lưu trữ trong thư mục log cho NPM
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'
Bạn đã kiểm tra https://stackoverflow.com/questions/20753550/enoent-no-such-file-or-directory –
này vẫn gặp lỗi tương tự. đường dẫn được hiển thị là thư mục gốc của dự án của tôi mà không có gói trực tiếp bên trong. Idk tại sao nó sẽ được tìm kiếm ở đó cho một cái gì đó –
Hình như phiên bản Cordova cũ với tôi. Tôi thấy cordova 2, trong khi cordova 7 là mới nhất. Có thể cài đặt lại toàn cầu cordova một lần nữa: install -g cordova Và đảm bảo không có cordova trong package.json của bạn. –