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
[NativeScript 6.0.0 migration] Error when livesync executed #507
Comments
This comment has been minimized.
This comment has been minimized.
Also additional issue that I am facing is with debugging inside VS code, breakpoint placed in .ts files are not hit. For example:
|
@VladimirAmiorkov I've just reproduced your error. I will try to fix it in the next days. |
We're experiencing a very similar issue with HMR after having upgraded to NS 5.4.2 and NS-Vue 2.2.2:
Not sure if the fixes associated with issue would solve the problem for us? |
Also got this error in versions: I don’t want to upgrade to version 6, because plugins will stop working. |
Same issue here, random times just get |
@VladimirAmiorkov Re-tested this issue and it's working (not crashing). BTW, there is still the related #518 issue with I think is related to the NS code as it fails both with the Vue and Angular bindings. |
Hi @msaelices , Great. Did you link the correct issue, as far as I see the #518 issue is a HRM issue? |
@VladimirAmiorkov I mean that the app is not crashing anymore but I can see the |
I fixed this issue by creating nsconfig.js in my root project directory and set useLegacyWorkflow to false. |
@ilsorliamsi I got |
@ilsorliamsi, |
Any updates here? This issue is still present in NS-Vue v2.4.0, NS v6.3. |
still got this error. Any updates? |
Same, got error |
Any update on this issue ? |
@rfink @adeyemiadetayoccl Would you be able to share a project that has issues? Everything seems to be working fine in our apps! |
@rigor789 you can try this starter template of mine (https://github.com/Lyduz/nitibo). Thus project utilizes natuvescript-vue with class component (typescript) |
HMR is not working, its restarting the app when you apply changes in vue files |
@kabaluyot cloned the repo - updated the dependencies as it was still using nativescript 6.4. Your tsconfig must set (You seem to have based your template on an older version - there are many dependencies that are either not used, or not required anymore as they have been added as transitive dependencies to After the updates - I ran the app, and HMR is working fine - the first update does restart the app - i'm pretty sure that's because of how you import/export classes in some ts modules. Subsequent updates work fine without a reload - and I don't see any errors in console. Keep in mind that template/style changes are usually picked up fine by HMR - logic/script changes need to re-create the whole component and that's not always possible. I personally use the This is what hmr looks on my end - I don't see anything wrong with it, can you confirm if this looks correct - or have I missed something? |
Video looks good. Can you please share the "updated and fixed" version of my starter template? I'll just wanna use it for reference and try in my end sir @rigor789 |
Sure, here are all the changes that I made to make it work A diff of the changes I madediff --git a/package.json b/package.json
index c4a3bdf..3575594 100644
--- a/package.json
+++ b/package.json
@@ -6,12 +6,11 @@
"license": "MIT",
"nativescript": {
"id": "com.xtalintegrated.karl",
- "templateVersion": "v2",
"tns-ios": {
- "version": "6.4.0"
+ "version": "6.5.0"
},
"tns-android": {
- "version": "6.4.1"
+ "version": "6.5.0"
}
},
"scripts": {
@@ -26,7 +25,7 @@
"@vue/devtools": "^5.3.3",
"axios": "^0.19.2",
"babel-core": "^6.26.3",
- "babel-loader": "^7.1.1",
+ "babel-loader": "^8.1.0",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-preset-env": "^1.7.0",
"eslint-config-prettier": "^6.10.1",
@@ -35,40 +34,40 @@
"lodash": "^4.17.15",
"nativescript-socketio": "^3.3.1",
"nativescript-toasty": "^3.0.0-alpha.2",
- "nativescript-vue": "^2.4.0",
+ "nativescript-vue": "^2.6.1",
"nativescript-vue-devtools": "^1.2.0",
- "nativescript-vue-navigator": "^0.2.0",
+ "nativescript-vue-navigator": "^1.2.0",
"net": "^1.0.2",
"prettier": "^2.0.4",
- "terser-webpack-plugin": "^2.3.5",
- "tns-core-modules": "~6.4.0",
+ "terser-webpack-plugin": "^3.0.1",
+ "tns-core-modules": "~6.5.1",
"tslib": "^1.11.0",
- "vue-property-decorator": "^7.3.0",
+ "vue-property-decorator": "^8.4.2",
"vuex": "^3.1.2",
"vuex-class": "^0.3.2"
},
"devDependencies": {
- "@types/node": "^10.17.16",
+ "@types/node": "^13.13.5",
"@typescript-eslint/eslint-plugin": "^2.27.0",
"@typescript-eslint/parser": "^2.27.0",
"babel-traverse": "6.26.0",
"babel-types": "6.26.0",
"babylon": "6.18.0",
"clean-webpack-plugin": "^1.0.1",
- "copy-webpack-plugin": "^4.5.2",
- "css-loader": "^1.0.0",
- "eslint": "^6.8.0",
+ "copy-webpack-plugin": "^5.1.1",
+ "css-loader": "^3.5.3",
+ "eslint": "^7.0.0",
"eslint-plugin-vue": "^7.0.0-alpha.0",
"lazy": "1.0.11",
- "mini-css-extract-plugin": "^0.4.5",
+ "mini-css-extract-plugin": "^0.9.0",
"nativescript-dev-webpack": "~1.5.0",
- "nativescript-vue-template-compiler": "^2.4.0",
- "nativescript-worker-loader": "^0.9.5",
+ "nativescript-vue-template-compiler": "^2.6.1",
+ "nativescript-worker-loader": "^0.11.0",
"node-sass": "^4.13.1",
- "sass-loader": "^7.3.1",
- "ts-loader": "^5.4.5",
+ "sass-loader": "^8.0.2",
+ "ts-loader": "^7.0.3",
"typescript": "^3.8.2",
- "uglifyjs-webpack-plugin": "~2.0.1",
+ "uglifyjs-webpack-plugin": "~2.2.0",
"vue": "^2.6.11",
"vue-loader": "^15.9.0",
"webpack": "^4.41.6",
diff --git a/tsconfig.json b/tsconfig.json
index 2417668..854a1be 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -5,7 +5,7 @@
"strict": true,
"strictPropertyInitialization": true,
"jsx": "preserve",
- "importHelpers": true,
+ "noEmitHelpers": true,
"moduleResolution": "node",
"experimentalDecorators": true,
"allowJs": false, A few packages could be removed all-together, but I didn't remove them... Seems to work fine this way. |
@rigor789 thank you so much sir. I followed the diff changes and updated some packages. HMR doesn't kick off at first time as you expected but works well consequently. We have the same error with this current issue thread, maybe the fix you mentioned would work here. |
Hello sorry about hijacking this threat, got some behavior that i think may be is related to this, when i change markup for example |
Hi,
We are testing the
next
version ofnativescript-vue
and thewebpack
tag of NativeScript in preparation for 6.0.0. When changing running an app on iostns run ios
with the following setup the below exception is thrown after you make changes to the app and it is livesynced.Setup:
webpack
tag of NativeScript globally:npm i -g nativescript@webpack
2.Install
webpack
tag ofnativescript-dev-webpack
:npm i nativescript-dev-webpack@webpack
next
tag ofnativescript-vue
:npm i nativescript-vue@next
tns run ios
The text was updated successfully, but these errors were encountered: