我无法在ionic 5.2.4v中安装软件包 cordova-res ,并在下面收到错误消息。
命令: cordova-res
- name: get kafka groups length
shell: echo "{{ groups['kafka']|length }}"
run_once: true
delegate_to: localhost
when: groups['kafka'] is defined
有任何帮助/提示。
答案 0 :(得分:0)
我尝试使用此但不起作用
npm i -g cordova-res
C:\hanu\cordova-res-master\cordova-res-master>npm i -g cordova-res
C:\Users\HanojBudime\AppData\Roaming\npm\cordova-res ->
C:\Users\HanojBudime\AppData\Roaming\npm\node_modules\cordova-res\bin\cordova-res
> sharp@0.22.1 install
C:\Users\HanojBudime\AppData\Roaming\npm\node_modules\cordova-res\node_modules\sharp
> (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
info sharp Using cached C:\Users\HanojBudime\AppData\Roaming\npm-cache\_libvips\libvips-8.7.4-win32-x64.tar.gz
ERR! sharp Please delete C:\Users\HanojBudime\AppData\Roaming\npm-cache\_libvips\libvips-8.7.4-win32-x64.tar.gz as it is not a valid tarball
ERR! sharp zlib: unexpected end of file
info sharp Attempting to build from source via node-gyp but this may fail due to the above error
info sharp Please see https://sharp.pixelplumbing.com/page/install for required dependencies
C:\Users\HanojBudime\AppData\Roaming\npm\node_modules\cordova-res\node_modules\sharp>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "C:\hanu\python-3.7.4.exe", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:484:19)
gyp ERR! stack at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:509:16)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:153:21)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\HanojBudime\AppData\Roaming\npm\node_modules\cordova-res\node_modules\sharp
gyp ERR! node -v v10.15.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sharp@0.22.1 install: (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sharp@0.22.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\HanojBudime\AppData\Roaming\npm-cache\_logs\2019-08-13T05_13_59_876Z-debug.log
答案 1 :(得分:0)
遇到同样的问题,即使是新版本。新项目。它做的一样。
cordova-res.cmd android
[cordova-res] internal/modules/cjs/loader.js:584
[cordova-res] throw err;
[cordova-res] ^
[cordova-res]
[cordova-res] Error: Cannot find module 'C:\npm\node_modules\cordova-res\bin\cordova-res'
[cordova-res] at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
[cordova-res] at Function.Module._load (internal/modules/cjs/loader.js:508:25)
[cordova-res] at Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
[cordova-res] at startup (internal/bootstrap/node.js:283:19)
[cordova-res] at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
答案 2 :(得分:0)