Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ionic-framework/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
ionic framework ios构建失败|社交共享|应用程序版本_Ios_Ionic Framework_Ionic4 - Fatal编程技术网

ionic framework ios构建失败|社交共享|应用程序版本

ionic framework ios构建失败|社交共享|应用程序版本,ios,ionic-framework,ionic4,Ios,Ionic Framework,Ionic4,我在尝试在Ionic pro服务中构建iOS时遇到了这个问题 这是输出: [14:05:26]: ▸ > GlamitApp@0.0.1 build /builds/project-0 [14:05:26]: ▸ > ionic-app-scripts build --buildConfig=build.json [14:05:28]: ▸ [14:05:28] ionic-app-scripts 3.1.2 [14:05:28]: ▸ [14:05:28] build dev

我在尝试在Ionic pro服务中构建iOS时遇到了这个问题

这是输出:

[14:05:26]: ▸ > GlamitApp@0.0.1 build /builds/project-0
[14:05:26]: ▸ > ionic-app-scripts build --buildConfig=build.json
[14:05:28]: ▸ [14:05:28]  ionic-app-scripts 3.1.2 
[14:05:28]: ▸ [14:05:28]  build dev started ...
[14:05:28]: ▸ [14:05:28]  clean started ...
[14:05:28]: ▸ [14:05:28]  clean finished in 4 ms
[14:05:28]: ▸ [14:05:28]  copy started ...
[14:05:28]: ▸ [14:05:28]  deeplinks started ...
[14:05:28]: ▸ [14:05:28]  deeplinks finished in 229 ms
[14:05:28]: ▸ [14:05:28]  transpile started ...
[14:05:33]: ▸ [14:05:33]  typescript: src/app/app.component.ts, line: 51 
[14:05:33]: ▸ Cannot find name 'SocialSharing'.
[14:05:33]: ▸       L50:    public events: Events,
[14:05:33]: ▸       L51:    private socialSharing: SocialSharing
[14:05:33]: ▸       L52:  ) {
[14:05:33]: ▸ [14:05:33]  typescript: src/app/app.module.ts, line: 64 
[14:05:33]: ▸ Argument of type '{ declarations: (typeof ChatPage | typeof RatePage | typeof DetallePedidoPage | typeof
[14:05:33]: ▸ HistorialP...' is not assignable to parameter of type 'NgModule'. Types of property 'providers' are
[14:05:33]: ▸ incompatible. Type '(typeof SplashScreen | SocialSharingOriginal | typeof UserProvider | typeof InAppBrowser
[14:05:33]: ▸ | AppVer...' is not assignable to type 'Provider[]'. Type 'typeof SplashScreen | SocialSharingOriginal |
[14:05:33]: ▸ typeof UserProvider | typeof InAppBrowser | AppVers...' is not assignable to type 'Provider'. Type
[14:05:33]: ▸ 'SocialSharingOriginal' is not assignable to type 'Provider'. Type 'SocialSharingOriginal' is not assignable
[14:05:33]: ▸ to type 'ClassProvider'. Property 'provide' is missing in type 'SocialSharingOriginal'.
[14:05:33]: ▸       L64:  @NgModule({                                                                                                                                                
[14:05:33]: ▸       L65:    declarations: [
[14:05:33]: ▸ [14:05:33]  typescript: src/pages/login/login.ts, line: 41 
[14:05:33]: ▸ Cannot find name 'AppVersion'.
[14:05:33]: ▸       L40:  public events: Events,
[14:05:33]: ▸       L41:  private appVersion: AppVersion) {
[14:05:33]: ▸       L42:  localStorage.removeItem('access_token');
[14:05:33]: ▸ [14:05:33]  typescript: src/pages/my-profile/my-profile.ts, line: 30 
[14:05:33]: ▸ Cannot find name 'AppVersion'.
[14:05:33]: ▸       L29:  public platform: Platform,
[14:05:33]: ▸       L30:  private appVersion: AppVersion) {
[14:05:33]: ▸ [14:05:33]  ionic-app-script task: "build" 
[14:05:33]: ▸ [14:05:33]  Error: Failed to transpile program 
[14:05:33]: ▸ Error: Failed to transpile program
[14:05:33]: ▸     at new BuildError (/builds/project-0/node_modules/@ionic/app-scripts/dist/util/errors.js:16:28)
[14:05:33]: ▸     at /builds/project-0/node_modules/@ionic/app-scripts/dist/transpile.js:159:20
[14:05:33]: ▸     at new Promise ()
[14:05:33]: ▸     at transpileWorker (/builds/project-0/node_modules/@ionic/app-scripts/dist/transpile.js:107:12)
[14:05:33]: ▸     at Object.transpile (/builds/project-0/node_modules/@ionic/app-scripts/dist/transpile.js:64:12)
[14:05:33]: ▸     at /builds/project-0/node_modules/@ionic/app-scripts/dist/build.js:109:82
[14:05:33]: ▸     at 
[14:05:33]: ▸ npm ERR! code ELIFECYCLE
[14:05:33]: ▸ npm ERR! errno 1
[14:05:33]: ▸ npm ERR! GlamitApp@0.0.1 build: `ionic-app-scripts build --buildConfig=build.json`
[14:05:33]: ▸ npm ERR! Exit status 1
[14:05:33]: ▸ npm ERR!
[14:05:33]: ▸ npm ERR! Failed at the GlamitApp@0.0.1 build script.
[14:05:33]: ▸ npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
在项目中正确添加了社交共享和AppVersion, 构建和编译总是可以的,但是现在我有这个错误

问题是这是另一件事吗

有人能帮我吗?我需要解决这个问题。
谢谢

似乎是语法错误

你能检查一下52号线的封闭支架吗

Cannot find name 'SocialSharing'.
[14:05:33]: ▸       L50:    public events: Events,
[14:05:33]: ▸       L51:    private socialSharing: SocialSharing
[14:05:33]: ▸       L52:  ) {

如果这不是一个问题,那么一定要让我知道,可能需要更多的信息来理解这个问题

我也面临着社交共享插件的循环依赖问题。我已经有一段时间没有使用该插件了,看来
@ionic national/social sharing
包现在导出类
SocialSharingOriginal
,而不是通常的
SocialSharing
。到目前为止,还没有发现任何突出显示突破性更改的更改日志,这可能是针对
Ionic 4

到目前为止,一个解决方法是导入
SocialSharing
类,如下所示

import { SocialSharing} from '@ionic-native/social-sharing/ngx';

不要忘记将您的
构造函数
声明和
app.module.ts
导入到
SocialSharing

这是故意的,它的构造函数关闭“')。语法没有问题。什么是社交共享版本?非常感谢,我解决了向导入添加/ngx的问题。真的离子4改变了一些东西。你怎么知道的??这篇帖子也对我有所帮助:我查看了
@爱奥尼亚原生/社交共享
软件包的源代码。以前的经验告诉我,当
SocialSharing
导入无法按预期工作时,出现了一些问题。特别是使用VSCode这样的好编辑器,您可以很好地了解可能发生的情况。