nativescript-angular
nativescript-angular copied to clipboard
Application refreshing every time after i saved changes in code
I get this log, after save some changes in code
`JS: [HMR][61c47bbb499df8b115e8] failure | A module has not been accepted. JS: [HMR][61c47bbb499df8b115e8] failure | Failed to apply. JS: Angular is running in development mode. Call enableProdMode() to enable production mode. JS: fingerprintAvailable { JS: "any": false JS: }
Refreshing application on device emulator-5554... Successfully transferred bundle.61c47bbb499df8b115e8.hot-update.js on device emulator-5554. Successfully transferred bundle.61c47bbb499df8b115e8.hot-update.json on device emulator-5554. Successfully transferred bundle.js on device emulator-5554. Restarting application on device emulator-5554... Successfully synced application org.nativescript.native2 on device emulator-5554.`
Environment
`{ "name": "@nativescript/template-hello-world-ng", "main": "src/main.ts", "version": "8.0.6", "author": "NativeScript Team [email protected]", "description": "NativeScript Application", "license": "SEE LICENSE IN
", "publishConfig": { "access": "public" }, "files": [ "App_Resources", "hooks", "src", "tools", "!tools/assets", ".editorconfig", "references.d.ts", "tsconfig.json" ], "keywords": [ "nativescript", "mobile", "angular", "{N}", "template" ], "repository": " ", "bugs": { "url": "https://github.com/NativeScript/NativeScript/issues" }, "dependencies": { "@angular/animations": "~11.2.7", "@angular/common": "~11.2.7", "@angular/compiler": "~11.2.7", "@angular/core": "~11.2.7", "@angular/forms": "~11.2.7", "@angular/platform-browser": "~11.2.7", "@angular/platform-browser-dynamic": "~11.2.7", "@angular/router": "~11.2.7", "@nativescript/angular": "~11.8.0", "@nativescript/background-http": "^5.0.2", "@nativescript/camera": "^5.0.8", "@nativescript/core": "~8.0.0", "@nativescript/datetimepicker": "^2.1.3", "@nativescript/fingerprint-auth": "^7.0.0", "@nativescript/imagepicker": "^1.0.4", "@nativescript/local-notifications": "^5.0.3", "@nativescript/theme": "~3.0.1", "@nativescript/ui-charts": "^0.1.0", "@nstudio/nativescript-checkbox": "^2.0.4", "@nstudio/nativescript-pulltorefresh": "^3.0.1", "moment": "^2.29.1", "nativescript-barcodescanner": "^4.1.1", "nativescript-carousel": "^7.0.1", "nativescript-clipboard": "^2.1.1", "nativescript-feedback": "^2.0.0", "nativescript-localstorage": "^2.0.2", "nativescript-permissions": "^1.3.11", "nativescript-ui-chart": "^8.0.2", "reflect-metadata": "~0.1.13", "rxjs": "~6.6.7", "save": "^2.4.0", "zone.js": "~0.11.4" }, "devDependencies": { "@angular/compiler-cli": "~11.2.7", "@nativescript/android": "8.0.0", "@nativescript/types": "~8.0.0", "@nativescript/webpack": "beta", "@ngtools/webpack": "~11.2.6", "typescript": "~4.0.0" }, "private": "true", "readme": "NativeScript Application" }
`
- CLI:
- Cross-platform modules:
- Android Runtime:
- iOS Runtime:
- Plugin(s):
- NativeScript-Angular:
- Angular:
**tns info**
√ Getting NativeScript components versions information...
‼ Update available for component nativescript. Your current version is 8.0.1 and the latest available version is 8.0.2.
√ Component @nativescript/core has 8.0.5 version and is up to date.
× Component @nativescript/ios is not installed.
√ Component @nativescript/android has 8.0.0 version and is up to date.
To Reproduce
I only create project, use ns create command and selected the template Angular
Expected behavior
i also run tns run android --log trace command, and i had the next log
i can not understand, why i get next message
i have tried to create a new project use command ns create, but i still have that problem with hmr
@NathanaelA could you help me please, with this problem ?
JS: [{ JS: "type": "unaccepted", JS: "chain": [ JS: "./src/app/app.component.ts", JS: "./src/app/app.module.ts", JS: "./src/main.ts" JS: ], JS: "moduleId": "./src/main.ts" JS: }]
Successfully transferred bundle.3a061e85f6ee18109fe9.hot-update.json on device emulator-5554. Successfully transferred bundle.3a061e85f6ee18109fe9.hot-update.js on device emulator-5554. Successfully transferred bundle.js on device emulator-5554. Will send the following information to Google Analytics: { type: 'googleAnalyticsData', category: 'CLI', googleAnalyticsDataType: 'event', action: 'Performance', label: 'PlatformLiveSyncServiceBase__liveSyncWatchAction', customDimensions: { cd2: 'Angular', cd9: 'false', cd5: 'CLI' }, value: 606 } spawn: C:\Android\android-sdk\platform-tools\adb "-s" "emulator-5554" "shell" "rm" "-rf" "/data/local/tmp/org.nativescript.artnative2-livesync-in-progress" JS: [HMR][Verbose] LiveSync JS: [HMR][3a061e85f6ee18109fe9] failure | A module has not been accepted. JS: [HMR][Verbose] Additional Info JS: [{ JS: "type": "unaccepted", JS: "chain": [ JS: "./src/app/app.component.ts", JS: "./src/app/app.module.ts", JS: "./src/main.ts" JS: ], JS: "moduleId": "./src/main.ts" JS: }] JS: --- JS: [HMR][3a061e85f6ee18109fe9] failure | Failed to apply. JS: [HMR][Verbose] Additional Info JS: [Aborted because ./src/app/app.component.ts is not accepted JS: Update propagation: ./src/app/app.component.ts -> ./src/app/app.module.ts -> ./src/main.ts] JS: --- JS: [HMR][Verbose] No modules applied. Result when throw error is false: { stdout: '', stderr: '', exitCode: 0 } Will send the following information to Google Analytics: { type: 'googleAnalyticsData', category: 'CLI', googleAnalyticsDataType: 'event', action: 'Performance', label: 'AndroidLiveSyncService__liveSyncWatchAction', customDimensions: { cd2: 'Angular', cd9: 'false', cd5: 'CLI' }, value: 977 } Refreshing application on device emulator-5554...
what's the issue ?
application is closing and opening again, after ctrl+s, it is takes much more time then only refresh the specific component
@iamabs2001, Please install project using command ns create and select template Angular, and you will see the problem which i writen here
Found a solution...
You have to upgrade your project to Angular 12, Latest TypeScript and webpack....