Ioniv-v4:ionic cordova 插件添加 cordova-plugin-googleplus 不工作
Ioniv-v4 : ionic cordova plugin add cordova-plugin-googleplus Not working
此 (cordova-plugin-googleplus) 命令不适用于 IONIC-v4-BETA,请帮助解决此问题,详情如下。
命令
ionic cordova plugin add cordova-plugin-googleplus --variable
REVERSED_CLIENT_ID=REV_KEY
命令错误
PS C:\ROOT\yaflix\Source\DEV\yaflix> ionic cordova plugin add cordova-plugin-googleplus --variable REVERSED_CLIENT_ID=com.googleusercontent.apps.****************************************
> cordova plugin add cordova-plugin-googleplus --variable REVERSED_CLIENT_ID=com.googleusercontent.apps.********************************** --save
(node:10740) UnhandledPromiseRejectionWarning: Error: cmd: Command failed with exit code 1 Error output:
npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR! syscall read
npm ERR! network read ECONNRESET
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\JACK\AppData\Roaming\npm-cache\_logs18-08-08T05_42_29_829Z-debug.log
at ChildProcess.whenDone (C:\Users\JACK\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-common\src\superspawn.js:169:23)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
(node:10740) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:10740) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
PS C:\ROOT\yaflix\Source\DEV\yaflix>
离子信息
Ionic:
ionic (Ionic CLI) : 4.0.3 (C:\Users\JACK\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/angular 4.0.0-beta.0
@angular-devkit/core : 0.7.0-rc.3
@angular-devkit/schematics : 0.7.0-rc.3
@angular/cli : 6.0.8
@ionic/ng-toolkit : 1.0.0
@ionic/schematics-angular : 1.0.1
Cordova:
cordova (Cordova CLI) : 8.0.0
Cordova Platforms : android 7.0.0
System:
NodeJS : v8.11.3 (C:\Program Files\nodejs\node.exe)
npm : 5.6.0
OS : Windows 10
Environment:
ANDROID_HOME : C:\Users\JACK\AppData\Local\Android\Sdk\platform-tools
cordova 插件 ls
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-ionic-keyboard 2.1.2 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 2.0.2 "cordova-plugin-ionic-webview"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-whitelist 1.3.3 "Whitelist"
Seems Like Network Problem
你有没有改变你的网络?比如 DNS 之类的?所以请将其设置为默认设置这是网络问题它只有在您更改了一些设置时才会发生否则这个 https 问题你能做一件事吗?
- 运行 这个命令
npm config edit
- 这将在 CMD 中打开文件并找到注册表,它将是这样的
registry=https://registry.npmjs.org/
- 如果有 https,则将其设为 http,如果注册表的 url 类似于 Github,则将其更改为
registry.npmjs.org/
。
让我知道结果了
Google plus 已停用,由于您使用的是 ionic4,因此您需要使用 google plus beta 版本
检查你的package.json
为了
"@ionic-native/google-plus": "5.0.0-beta.0",
并像这样导入
从 '@ionic-native/google-plus/ngx' 导入 { GooglePlus };
我知道已经晚了……但我找到了解决方案……如果有人遇到此类问题……请按照以下步骤操作……
** 原因:** 当您在本地和全局安装 NPM 时会发生这种情况。
解决方案
- 全局卸载 NPM、NODE 和 Ionic。
- 清除所有与npm和node相关的临时文件和本地文件
- 重新安装 Node 和 NPM
始终不要全局安装 NPM。
Install dependencies in the local node_model folder. In global mode
(i.e., with the -g or - command), it establishes the current package
reference (i.e., the current working directory) as a global package.
By default, the npm install package will install all the modules
listed in the json as dependency.
此 (cordova-plugin-googleplus) 命令不适用于 IONIC-v4-BETA,请帮助解决此问题,详情如下。
命令
ionic cordova plugin add cordova-plugin-googleplus --variable REVERSED_CLIENT_ID=REV_KEY
命令错误
PS C:\ROOT\yaflix\Source\DEV\yaflix> ionic cordova plugin add cordova-plugin-googleplus --variable REVERSED_CLIENT_ID=com.googleusercontent.apps.****************************************
> cordova plugin add cordova-plugin-googleplus --variable REVERSED_CLIENT_ID=com.googleusercontent.apps.********************************** --save
(node:10740) UnhandledPromiseRejectionWarning: Error: cmd: Command failed with exit code 1 Error output:
npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR! syscall read
npm ERR! network read ECONNRESET
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\JACK\AppData\Roaming\npm-cache\_logs18-08-08T05_42_29_829Z-debug.log
at ChildProcess.whenDone (C:\Users\JACK\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-common\src\superspawn.js:169:23)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
(node:10740) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:10740) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
PS C:\ROOT\yaflix\Source\DEV\yaflix>
离子信息
Ionic:
ionic (Ionic CLI) : 4.0.3 (C:\Users\JACK\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/angular 4.0.0-beta.0
@angular-devkit/core : 0.7.0-rc.3
@angular-devkit/schematics : 0.7.0-rc.3
@angular/cli : 6.0.8
@ionic/ng-toolkit : 1.0.0
@ionic/schematics-angular : 1.0.1
Cordova:
cordova (Cordova CLI) : 8.0.0
Cordova Platforms : android 7.0.0
System:
NodeJS : v8.11.3 (C:\Program Files\nodejs\node.exe)
npm : 5.6.0
OS : Windows 10
Environment:
ANDROID_HOME : C:\Users\JACK\AppData\Local\Android\Sdk\platform-tools
cordova 插件 ls
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-ionic-keyboard 2.1.2 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 2.0.2 "cordova-plugin-ionic-webview"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-whitelist 1.3.3 "Whitelist"
Seems Like Network Problem
你有没有改变你的网络?比如 DNS 之类的?所以请将其设置为默认设置这是网络问题它只有在您更改了一些设置时才会发生否则这个 https 问题你能做一件事吗?
- 运行 这个命令
npm config edit
- 这将在 CMD 中打开文件并找到注册表,它将是这样的
registry=https://registry.npmjs.org/
- 如果有 https,则将其设为 http,如果注册表的 url 类似于 Github,则将其更改为
registry.npmjs.org/
。
让我知道结果了
Google plus 已停用,由于您使用的是 ionic4,因此您需要使用 google plus beta 版本
检查你的package.json 为了 "@ionic-native/google-plus": "5.0.0-beta.0",
并像这样导入 从 '@ionic-native/google-plus/ngx' 导入 { GooglePlus };
我知道已经晚了……但我找到了解决方案……如果有人遇到此类问题……请按照以下步骤操作……
** 原因:** 当您在本地和全局安装 NPM 时会发生这种情况。
解决方案
- 全局卸载 NPM、NODE 和 Ionic。
- 清除所有与npm和node相关的临时文件和本地文件
- 重新安装 Node 和 NPM
始终不要全局安装 NPM。
Install dependencies in the local node_model folder. In global mode (i.e., with the -g or - command), it establishes the current package reference (i.e., the current working directory) as a global package. By default, the npm install package will install all the modules listed in the json as dependency.