当前位置: 首页 > 工具软件 > npm-consider > 使用案例 >

npm install appium-doctor-g 报错Unexpected end of JSON input while parsing near '...":"git+ssh://git@g

阎辰钊
2023-12-01

安装appium-doctor报错

test@test:~/android-sdk-linux/tools$ npm install appium-doctor -g
npm WARN deprecated authorize-ios@1.2.1: Moved into appium
npm WARN deprecated @babel/polyfill@7.4.4: ? As of Babel 7.4.0, this
npm WARN deprecated package has been deprecated in favor of directly
npm WARN deprecated including core-js/stable (to polyfill ECMAScript
npm WARN deprecated features) and regenerator-runtime/runtime
npm WARN deprecated (needed to use transpiled generator functions):
npm WARN deprecated 
npm WARN deprecated   > import "core-js/stable";
npm WARN deprecated   > import "regenerator-runtime/runtime";
npm ERR! Unexpected end of JSON input while parsing near '...":"git+ssh://git@gith'

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/test/.npm/_logs/2019-07-22T07_55_18_858Z-debug.log
test@test:~/android-sdk-linux/tools$ 
test@test:~/android-sdk-linux/tools$ 
test@test:~/android-sdk-linux/tools$ 
test@test:~/android-sdk-linux/tools$ 
解决:

执行下面命令
test@test:~/android-sdk-linux/tools$ npm cache clean --force
npm WARN using --force I sure hope you know what you are doing.
test@test:~/android-sdk-linux/tools$ 
test@test:~/android-sdk-linux/tools$ 

再次执行安装命令
test@test:~/android-sdk-linux/tools$ npm install appium-doctor -g
npm WARN deprecated authorize-ios@1.2.1: Moved into appium
npm WARN deprecated @babel/polyfill@7.4.4: ? As of Babel 7.4.0, this
npm WARN deprecated package has been deprecated in favor of directly
npm WARN deprecated including core-js/stable (to polyfill ECMAScript
npm WARN deprecated features) and regenerator-runtime/runtime
npm WARN deprecated (needed to use transpiled generator functions):
npm WARN deprecated 
npm WARN deprecated   > import "core-js/stable";
npm WARN deprecated   > import "regenerator-runtime/runtime";
[..................] | fetchMetadata: sill resolveWithNewModule xml2js@0.4.19 checking installable status
[..................] | fetchMetadata: sill resolveWithNewModule xml2js@0.4.19 checking installable status
[..................] | fetchMetadata: sill resolveWithNewModule xml2js@0.4.19 checking installable status
[..................] | fetchMetadata: sill resolveWithNewModule xml2js@0.4.19 checking installable status
[..................] | fetchMetadata: sill resolveWithNewModule xml2js@0.4.19 checking installable status
[..................] | fetchMetadata: sill resolveWithNewModule xml2js@0.4.19 checking installable status
[..................] | fetchMetadata: sill resolveWithNewModule xml2js@0.4.19 checking installable status
npm WARN deprecated core-js@1.2.7: core-js@<2.6.8 is no longer maintained. Please, upgrade to core-js@3 or at least to actual version of core-js@2.
npm WARN tarball tarball data for @jimp/plugin-print@^0.6.4 (sha512-3z5DLVCKg0NfZhHATEaYH/4XanIboPP1pOUoxIUeF++qOnGiGgH2giFJlRprHmx2l3E3DukR1v8pt54PGvfrFw==) seems to be corrupted. Trying one more time.
/home/test/node-v10.16.0-linux-x64/bin/appium-doctor -> /home/test/node-v10.16.0-linux-x64/lib/node_modules/appium-doctor/appium-doctor.js

> core-js@2.6.9 postinstall /home/test/node-v10.16.0-linux-x64/lib/node_modules/appium-doctor/node_modules/core-js
> node scripts/postinstall || echo "ignore"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
> https://opencollective.com/core-js 
> https://www.patreon.com/zloirock 

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)

+ appium-doctor@1.11.1
added 305 packages from 276 contributors in 1530.277s
 

 类似资料: