Nativescript ios 构建失败

Nativescript ios build fails

我正在尝试为 iOS 构建我的应用程序,但出现此错误:

Successfully prepared plugin tns-core-modules for ios.
Processing node_modules failed. TypeError: str.replace is not a function

我不明白为什么只有在为 iOS 构建时才会出现这种情况(android 工作正常)。 我已经尝试过 adding/removing 个平台,更新 nativescript 等。 这是我关于 运行 版本

的 package.json 部分
  "nativescript": {
    "id": "com.xxxxx.app",
    "tns-android": {
      "version": "2.4.0"
    },
    "tns-ios": {
      "version": "2.4.0"
    }
  },
  "dependencies": {
    "tns-core-modules": "^2.4.0"
  },

我的打字稿版本是1.8。 这可能是什么原因造成的? 这是我的 tsconfig.json

{
    "compilerOptions": {
        "module": "commonjs",
        "target": "es5",
        "sourceMap": false,
        "experimentalDecorators": true,
        "emitDecoratorMetadata": true,
        "noEmitHelpers": true,
        "noEmitOnError": true
    },
    "exclude": [
        "node_modules",
        "platforms"
    ]
}

您可能缺少引用设置。我一直在使用 NativeScript 和 TypeScript 2+。请查看此示例应用程序,也许您会将其与您的设置进行比较:https://github.com/TobiasHennig/nativescript-toast/tree/master/samples/angular

我不得不删除 hooks bin 并重新安装 ios 平台。