Nativescript 6.4.2 iOS webpack does not watch for changes

282 views Asked by At

I have a NS 6.4.2 application which I am testing on an iPhone 11 ProMax - 13.3 simulator, but the same issue happens if I test on a physical device.

Recently, when I run the app with tns run ios or tns debug ios webpack stopped watching for file changes. It is very strange because sometimes it does, but it stops after the first refresh.

This is what I see in the console:

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.

No mention of a webpack compilation or watching files.

I have updated all plugins to their latest versions and tried cleaning up the project and rebuilding again. Nothing seems to help.

Here is my 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"
}

Any ideas on how to fix that. Currently, I have to stop and rebuild every time I make a change. Not very productive.

Thanks.

1

There are 1 answers

0
dpdragnev On

So, after several days of trying everything, the issue was resolved by restarting my machine. I have no idea why it is working now, or why it did not work before, but if you find yourself in the same situation, a simple restart may solve the problem.