npm cordova错误阻止安装

时间:2017-10-31 19:45:11

标签: cordova npm

由于弹出的错误,我无法运行任何npm install命令。我不确定这意味着什么:

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 

我应该采取哪些措施来解决错误?

完整跟踪:

这是存储在npm <。p>的.log文件夹中的详细跟踪

16 silly install generateActionsToTake
17 silly diffTrees action count 5
18 silly diffTrees update cordova-common@file:file:cordova-dist/tools/cordova-common-1.5.1.tgz
19 silly diffTrees remove angular2-google-maps@0.17.0
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 cordova-common@1.5.1
25 silly decomposeActions remove cordova-common@1.5.1
26 silly decomposeActions fetch cordova-common@file:file:cordova-dist/tools/cordova-common-1.5.1.tgz
27 silly decomposeActions extract cordova-common@file:file:cordova-dist/tools/cordova-common-1.5.1.tgz
28 silly decomposeActions preinstall cordova-common@file:file:cordova-dist/tools/cordova-common-1.5.1.tgz
29 silly decomposeActions build cordova-common@file:file:cordova-dist/tools/cordova-common-1.5.1.tgz
30 silly decomposeActions install cordova-common@file:file:cordova-dist/tools/cordova-common-1.5.1.tgz
31 silly decomposeActions postinstall cordova-common@file:file:cordova-dist/tools/cordova-common-1.5.1.tgz
32 silly decomposeActions finalize cordova-common@file:file:cordova-dist/tools/cordova-common-1.5.1.tgz
33 silly decomposeActions refresh-package-json cordova-common@file:file:cordova-dist/tools/cordova-common-1.5.1.tgz
34 silly decomposeActions unbuild angular2-google-maps@0.17.0
35 silly decomposeActions remove angular2-google-maps@0.17.0
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 cordova-common@file:file:cordova-dist/tools/cordova-common-1.5.1.tgz
48 silly pacote trying cordova-common@file: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/file-opener@4.3.2 requires a peer of @ionic-native/core@^4.2.0 but none is installed. You must install peer dependencies yourself.
52 warn ajv-keywords@2.1.0 requires a peer of ajv@>=5.0.0 but none is installed. You must install peer dependencies yourself.
53 warn ng2-charts@1.5.0 requires a peer of @angular/common@^2.3.0 but none is installed. You must install peer dependencies yourself.
54 warn ng2-charts@1.5.0 requires a peer of @angular/core@^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'

1 个答案:

答案 0 :(得分:3)

找到导致问题的文件后,cordova-common。我能够删除导致问题的Android平台(因为我不需要它)并且能够在没有失败的情况下重新运行npm install