【问题标题】:Nativescript 6.4.2 iOS webpack does not watch for changesNativescript 6.4.2 iOS webpack 不监视更改
【发布时间】:2020-11-05 06:49:18
【问题描述】:

我有一个 NS 6.4.2 应用程序,我正在 iPhone 11 ProMax - 13.3 模拟器上进行测试,但如果我在物理设备上进行测试,也会出现同样的问题。

最近,当我使用 tns run ios 或 tns debug ios 运行应用程序时,webpack 停止监视文件更改。这很奇怪,因为有时确实如此,但在第一次刷新后就停止了。

这是我在控制台中看到的:

Project successfully built.
The build result is located at: /Users/mfgmarketing/Documents/MobileApp/platforms/ios/build/Debug-iphonesimulator/MobileApp.app
Installing on device 6E202811-97C0-46CA-8DA7-B55A60FA4BC4...
Successfully installed on device with identifier '6E202811-97C0-46CA-8DA7-B55A60FA4BC4'.
Successfully transferred all files on device 6E202811-97C0-46CA-8DA7-B55A60FA4BC4.
Restarting application on device 6E202811-97C0-46CA-8DA7-B55A60FA4BC4...
CONSOLE INFO file:///node_modules/nativescript-dev-webpack/hot.js:3:0: HMR: Hot Module Replacement Enabled. Waiting for signal.
NativeScript debugger has opened inspector socket on port 18183 for com.company.app.
Successfully synced application com.awlinc.awlmobile on device 6E202811-97C0-46CA-8DA7-B55A60FA4BC4.
CONSOLE LOG file:///node_modules/@nativescript/core/inspector_modules.js:1:0: Loading inspector modules...
CONSOLE LOG file:///node_modules/@nativescript/core/inspector_modules.js:6:0: Finished loading inspector modules.
NativeScript debugger attached.

没有提及 webpack 编译或观看文件。

我已将所有插件更新为最新版本,并尝试清理项目并再次重建。似乎没有任何帮助。

这是我的 package.json:

{
  "nativescript": {
    "id": "com.company.app",
    "tns-ios": {
      "version": "6.4.2"
    }
  },
  "main": "app.js",
  "description": "NativeScript Application",
  "license": "SEE LICENSE IN <your-license-filename>",
  "repository": "<fill-your-repository-here>",
  "dependencies": {
    "@nativescript/theme": "^2.3.3",
    "@nstudio/nativescript-loading-indicator": "^3.0.4",
    "@types/node": "14.0.22",
    "moment": "^2.27.0",
    "moment-timezone": "^0.5.31",
    "nativescript-email": "^1.6.0",
    "nativescript-exit": "^1.0.1",
    "nativescript-phone": "^2.0.0",
    "nativescript-plugin-firebase": "^10.5.2",
    "tns-core-modules": "6.5.10"
  },
  "devDependencies": {
    "nativescript-dev-webpack": "1.5.1",
    "tns-platform-declarations": "^6.5.9",
    "typescript": "3.9.6"
  },
  "gitHead": "2250137db8c1e0bd0eb543e8e4563cb71480c00d",
  "readme": "NativeScript Application"
}

关于如何解决这个问题的任何想法。目前,每次进行更改时,我都必须停止并重建。效率不高。

谢谢。

【问题讨论】:

    标签: nativescript nativescript-cli


    【解决方案1】:

    所以,在尝试了几天之后,通过重新启动我的机器解决了这个问题。我不知道为什么它现在可以工作,或者为什么它之前没有工作,但是如果您发现自己处于同样的情况,简单的重新启动可能会解决问题。

    【讨论】:

      猜你喜欢
      • 2015-06-25
      • 1970-01-01
      • 1970-01-01
      • 2018-04-03
      • 1970-01-01
      • 2021-06-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多