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

安装appium-doctor报错

test@test:~/android-sdk-linux/tools$ npm install appium-doctor -g
npm WARN deprecated [email protected]: Moved into appium
npm WARN deprecated @babel/[email protected]: ? 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 [email protected]: Moved into appium
npm WARN deprecated @babel/[email protected]: ? 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 [email protected] checking installable status
[..................] | fetchMetadata: sill resolveWithNewModule [email protected] checking installable status
[..................] | fetchMetadata: sill resolveWithNewModule [email protected] checking installable status
[..................] | fetchMetadata: sill resolveWithNewModule [email protected] checking installable status
[..................] | fetchMetadata: sill resolveWithNewModule [email protected] checking installable status
[..................] | fetchMetadata: sill resolveWithNewModule [email protected] checking installable status
[..................] | fetchMetadata: sill resolveWithNewModule [email protected] checking installable status
npm WARN deprecated [email protected]: 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

> [email protected] 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 -)

+ [email protected]
added 305 packages from 276 contributors in 1530.277s
 

你可能感兴趣的:(npm install appium-doctor-g 报错Unexpected end of JSON input while parsing near '...":"git+ssh://git@g)