Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application refreshing every time after i saved changes in code #2357

Open
PetroSuch opened this issue May 13, 2021 · 5 comments
Open

Application refreshing every time after i saved changes in code #2357

PetroSuch opened this issue May 13, 2021 · 5 comments

Comments

@PetroSuch
Copy link

PetroSuch commented May 13, 2021

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

@PetroSuch
Copy link
Author

PetroSuch commented May 14, 2021

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...

@iamabs2001
Copy link

what's the issue ?

@PetroSuch
Copy link
Author

PetroSuch commented May 24, 2021

application is closing and opening again, after ctrl+s, it is takes much more time then only refresh the specific component

@PetroSuch
Copy link
Author

@iamabs2001, Please install project using command ns create and select template Angular, and you will see the problem which i writen here

@stefan-uhlemann
Copy link

stefan-uhlemann commented Aug 6, 2021

Found a solution...

You have to upgrade your project to Angular 12, Latest TypeScript and webpack....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants