安装 mobileui 时出错 npm install -g mobileui

Error while installing mobileui npm install -g mobileui

我安装

npm i -g cordova

(安装成功并正常工作)

但是在安装的时候

npm install -g mobileui

我正在使用节点 10.24.1 npm -v 6.14.12

显示以下错误

C:\Users\shakeel\Desktop\myapp3>npm install -g mobileui
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated natives@1.1.6: This module relies on Node.js's internals and will break at some point. Do not use it, and update to graceful-fs@4.x.

> mobileui@1.1.20 preinstall C:\Users\shakeel\AppData\Roaming\npm\node_modules\mobileui
> npx npm-force-resolutions

npx: installed 6 in 4.623s
Error: ENOENT: no such file or directory, open './package-lock.json'
    at Object.openSync (fs.js:443:3)
    at Object.fs [as readFileSync] (fs.js:343:35)
    at npm_force_resolutions$core$node_slurp (C:\Users\shakeel\AppData\Roaming\npm-cache\_npx24\node_modules\npm-force-resolutions\out\npm_force_resolutions\core.cljs:15:20)
    at npm_force_resolutions$core$read_json (C:\Users\shakeel\AppData\Roaming\npm-cache\_npx24\node_modules\npm-force-resolutions\out\npm_force_resolutions\core.cljs:22:23)
    at switch__2144__auto__ (C:\Users\shakeel\AppData\Roaming\npm-cache\_npx24\node_modules\npm-force-resolutions\out\npm_force_resolutions\core.cljs:151:3)
    at C:\Users\shakeel\AppData\Roaming\npm-cache\_npx24\node_modules\npm-force-resolutions\out\npm_force_resolutions\core.cljs:151:3
    at npm_force_resolutions$core$update_package_lock_$_state_machine__2145__auto____1 (C:\Users\shakeel\AppData\Roaming\npm-cache\_npx24\node_modules\npm-force-resolutions\out\npm_force_resolutions\core.js:648:4)
    at cljs.core.async.impl.ioc-helpers/FN-IDX (C:\Users\shakeel\AppData\Roaming\npm-cache\_npx24\node_modules\npm-force-resolutions\out\npm_force_resolutions\core.js:664:88)
    at cljs.core.async.impl.ioc-helpers/run-state-machine (C:\Users\shakeel\AppData\Roaming\npm-cache\_npx24\node_modules\npm-force-resolutions\out\cljs\core\async\impl\ioc_helpers.cljs:35:23)
    at cljs$core$async$impl$ioc_helpers$run_state_machine_wrapped (C:\Users\shakeel\AppData\Roaming\npm-cache\_npx24\node_modules\npm-force-resolutions\out\cljs\core\async\impl\ioc_helpers.cljs:39:6)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.1 (node_modules\mobileui\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! mobileui@1.1.20 preinstall: `npx npm-force-resolutions`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mobileui@1.1.20 preinstall 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\shakeel\AppData\Roaming\npm-cache\_logs21-04-14T07_02_43_849Z-debug.log

我找到了问题的答案。

npm uninstall -g mobileui npm install -g mobileui@1.1.19

如果您使用的是节点 10.24.1 npm -v 6.14.12 那么用户是 1.1.10 版本。