问题如下:
G:WorkAMC>cordova plugin add cordova-plugin-app-version (node:9884) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): CordovaError: Failed to fetch plugin cordova-plugi n-app-version via registry. Probably this is either a connection problem, or plugin spec is incorrect. Check your connection and plugin name/version/URL.Error: cmd: Command failed with exit code 4294963238 Error output:npm WARN myapp@1.1.1 No repository field. npm WARN myapp@1.1.1 No license field. npm ERR! path G:WorkAMCnode_modules_glob@7.1.3@globnode_modulesfs.realpath npm ERR! code ENOENT npm ERR! errno -4058npm ERR! syscall rename npm ERR! enoent ENOENT: no such file or directory, rename 'G:WorkAMCnode_modules_glob@7.1.3@globnode_modulesfs.realpath' -> 'G:WorkAMC node_modules_glob@7.1.3@globnode_modulesfs.realpath'npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent npm ERR! A complete log of this run can be found in:npm ERR! D:Nodejsnode_cache_logs2018-09-21T14_58_53_089Z-debug.log (node:9884) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled w ill terminate the Node.js process with a non-zero exit code.
重点信息如下:
UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): CordovaError: Failed to fetch plugin cordova-plugin-app-version via registry. Probably this is either a connection problem, or plugin spec is incorrect. Check your connection and plugin name/version/URL.
作者:邪人君子
链接:https://www.jianshu.com/p/2ae8b7d97c1c



