it seems a week or so ago, nativescript lost the ability to talk to the vue devtools. See this issue on github. Run this repo to reproduce -- (you will need to change the host variable in main.js to your computer's network address).
Here are some things I've tried:
Several different networks, including wired, public and private wifi, and mobile hotspot
Local Android emulator with host set to "localhost" and also host excluded.
Physical android device Samsung S9 with latest Android OS
Took the code from nativescript-vue-devtools package and added console logging. Appears to be getting stuck when connecting to the devtools socket in the connect_error -> reconnect loop. Unfortunately the arguments to the connect error event are null so there's no clear reason why it's failing.
Here is the package.json from that project -- they are all defaults after using the CLI to initialize the project:
{
"name": "nsvue-devtools-test",
"version": "1.0.0",
"description": "A native application built with NativeScript-Vue",
"author": "Will P.",
"license": "MIT",
"nativescript": {
"id": "org.nativescript.application",
"tns-ios": {
"version": "5.0.0"
},
"tns-android": {
"version": "5.0.0"
}
},
"dependencies": {
"vuex": "^3.0.1",
"#vue/devtools": "5.0.0-beta.3",
"nativescript-socket.io": "^0.9.0",
"nativescript-vue-devtools": "^1.0.0",
"nativescript-toast": "^1.4.6",
"nativescript-vue": "^2.0.0",
"tns-core-modules": "^5.0.2"
},
"devDependencies": {
"#babel/core": "^7.0.0",
"#babel/preset-env": "^7.0.0",
"babel-loader": "^8.0.2",
"babel-traverse": "6.26.0",
"babel-types": "6.26.0",
"babylon": "6.18.0",
"clean-webpack-plugin": "^0.1.19",
"copy-webpack-plugin": "^4.5.2",
"css-loader": "^1.0.0",
"lazy": "1.0.11",
"nativescript-dev-webpack": "next",
"nativescript-vue-template-compiler": "^2.0.0",
"nativescript-worker-loader": "~0.9.0",
"node-sass": "^4.9.2",
"sass-loader": "^7.1.0",
"terser-webpack-plugin": "^1.1.0",
"vue-loader": "^15.2.6",
"webpack": "^4.16.4",
"webpack-bundle-analyzer": "~2.13.1",
"webpack-cli": "^3.1.0"
}
}
I have also tried on another project using the latest versions of nativescript toast and vue devtools with the same result -- vue devtools never changes from the default screen.
I am able to use termux with nmap to scan from my debugging device and see that my IP/port is open. I am also able to make a very basic website, add a vue instance, and paste the script tag shown in the developer tools UI to show that the devtools are working properly.
Nativescript: you are losing users to react native over this problem (see comments in the issue link above). Vue devtools just released a new version advertising better nativescript support, but we are completely unable to even try it out!
Since Nativescript's community has moved here, I am really just hoping to catch the attention of the devs to get this issue resolved. If anyone else is able to provide a workaround or solution to this problem that would be appreciated as well.
Thanks in advance!
To get my android emulator running NativeScript vue app talking to Vue Devtools electron app,
I needed to set android to allow clear text traffic
In AndroidManifest.xml
set
android:usesCleartextTraffic="true" on the existing node.
for example
<application
android:name="com.tns.NativeScriptApplication"
android:allowBackup="true"
android:icon="#drawable/icon"
android:label="#string/app_name"
android:theme="#style/AppTheme"
android:usesCleartextTraffic="true"
>
This solution was from this comment
https://github.com/nativescript-vue/nativescript-vue-devtools/issues/8#issuecomment-496292399
It might be also possible to solve this by creating or modifying the network_security_config.xml file.
I doubt this is a change that you would want to commit and have in production, so I am using it only in local development.
Could you try with this deps in your package.json:
"nativescript-toasty": "^1.3.0",
"nativescript-socketio": "^3.2.1",
"nativescript-vue-devtools": "github:anthonny/nativescript-vue-devtools#master",
I do not use nativescript-socket.io and nativescript-toast, but nativescript-socketio (without the .) and nativescript-toasty
It is more a workaround than a real solution but if it can help ;)
Related
The new apollo server v4 is out and I am having problem integrating TypeGraphQL with #apollo/server. I somehow integrated myself but getting this error. It says TypeGraphQL have UnmetGraphQLPeerDependencyError .
UnmetGraphQLPeerDependencyError: Looks like you use an incorrect version of the 'graphql' package: "16.6.0". Please ensure that you have installed a version that meets TypeGraphQL's requirement: "^15.3.0".
I tried changing the GraphQL version to ^15.3.0 in package.json but now #apollo/server has UnmetGraphQLPeerDependencyError
"dependencies": {
"#apollo/server": "^4.3.0",
"#graphql-tools/schema": "^9.0.12",
"body-parser": "^1.20.1",
"class-validator": "^0.14.0",
"cors": "^2.8.5",
"express": "^4.18.2",
"fastify": "^4.10.2",
"graphql": "^15.3.0",
"graphql-tag": "^2.12.6",
"mercurius": "^11.4.0",
"reflect-metadata": "^0.1.13",
"type-graphql": "^1.1.1"
}
I have a general idea of setting up file uploads with graphqlUploadExpress. Is there anything different in typegraphql?
I'm working on a Laravel 5.7 project that has been through a few different developers. Recently one of the devs did an npm update that caused a few issues. I've got most all of those issues cleaned up, but now we are seeing an "o is not a function" error any time we try and access a variable in a vue component. This issue only shows up after an npm run prod. If we do an npm run dev everything works fine and the site looks perfect.
This has been a nightmare to debug since it only shows up in the minified production build. I've tried using a few different versions of npm and some different minor releases of vue. I know it's happening whenever we access a variable because I removed everything except for a #{{ status }} call inside of the component. Without that I get no error and with it I get that "o is not a function" error.
Here are the dependencies in our package.json:
"devDependencies": {
"axios": "^0.18.1",
"bootstrap": "^4.3.1",
"cross-env": "^5.1",
"jquery": "^3.6.2",
"laravel-mix": "^2.1.14",
"lodash": "^4.17.15",
"popper.js": "^1.16.1",
"vue": "^2.7.14",
"vue-template-compiler": "^2.7.14"
},
"dependencies": {
"axios-retry": "^3.1.2",
"codemirror": "^5.65.10",
"es6-promise": "^4.2.8",
"inputmask": "^4.0.8",
"mjml": "^4.4.1",
"moment": "^2.24.0",
"npm": "^6.11.2",
"signature_pad": "^3.0.0-beta.3",
"spectrum-colorpicker": "^1.8.0",
"vue-ckeditor2": "^2.1.5",
"vue-markdown": "^2.2.4",
"vue-simplemde": "^1.1.2",
"vue2-dropzone": "^3.6.0",
"vuejs-datepicker": "^1.6.2",
"vuex": "^3.6.2"
}
I run into the same problem, so what i did is removing vue-bootstap package
if you changed or updated version of laravel-mix or wabpack restore the inial ones
Upon running yarn prod inside a Laravel Breeze project with Vue3 and InertiaJS, this console error is thrown:
Cannot read properties of undefined (reading '$page')
I am unable to find anything anywhere else that will fix my issue, I first thought it was a <script setup> issue with Vue3, and tried the solution found in this issue which ended up not working for me, which makes me believe it's an Inertia issue potentially.
We have another project running Breeze, Vue3 and Inertia currently in production working perfectly fine which is only confusing myself even more.
Dependencies as below
"laravel/framework": "^9.11",
"php": "^8.0.2",
"inertiajs/inertia-laravel": "^0.5.4",
"vue-loader": "^17.0.0"
"vue": "^3.2.31",
"#inertiajs/inertia": "^0.11.0",
"#inertiajs/inertia-vue3": "^0.6.0",
Any help will be greatly appreciated.
Thanks
I have created a vuejs template with laravel integration. On creating project with vue-laravel, by default the laravel-mix version is 2.0 and at that time my project is running well in all browsers. But now I am updating version of laravel-mix from 2.0 to 4.0.14. On updating it, blank screen should be display on I.E browser. As I am new in vue+laravel and not enough knowledge about it. I am trying to resolve this issue by following many links but did't get the results. Please anyone knows how it should be possible to run vue+laravel project on IE and what changes are required.
Screenshot of IE browser console:
Here is my webpack.mix.js file code:
//webpack.mix.js
let mix = require('laravel-mix');
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel application. By default, we are compiling the Sass
| file for the application as well as bundling up all the JS files.
|
*/
mix.autoload({
'jquery': ['$', 'window.jQuery', 'jQuery'],
})
mix.js('resources/js/main.js', 'public/js');
Here is my development dependencies in package.json file:
// package.json
"devDependencies": {
"axios": "^0.18",
"babel-preset-stage-2": "^6.24.1",
"bootstrap": "^4.1.3",
"cross-env": "^5.2.0",
"jquery": "^3.3.1",
"laravel-mix": "^4.0.14",
"lodash": "^4.17.11",
"node-sass": "^4.11.0",
"popper.js": "^1.14.6",
"sass-loader": "^7.1.0",
"vue": "^2.5.19",
"vue-template-compiler": "^2.5.22"
}
.babelrc file code:
//.babelrc
{
"plugins": ["syntax-dynamic-import"]
}
If anyone needs more info let me know. Thanks!
for IE, you need to install and include polyfill as well.
npm install --save #babel/polyfill
We are developing an app using node for the server/api and angular for the frontend, and currently we am facing a strange problem on one of my team members machine.
We are 3 developers 2 of us use Windows 10 and the other uses MacOS 10.12.5, which is the one that presents the following problem when trying to load the client on a browser:
zone.js:642 Unhandled Promise rejection: Template parse errors:
More than one component matched on this element.
Make sure that only one component's selector can match a given element.
Conflicting components: MdButton,MdButton ("<span>[ERROR ->]<button class="butron" md-button [mdMenuTriggerFor]="menu">{{menuItem}}</button>
<md-menu #menu="mdMe"): ng:///AppModule/MenuComponentComponent.html#0:6
More than one component matched on this element.
Make sure that only one component's selector can match a given element.
Conflicting components: MdMenuItem,MdMenuItem ("}}</button>
<md-menu #menu="mdMenu">
<a [routerLink]="['/participant']" routerLinkActive="active">[ERROR ->]<button md-menu-item>Participante</button></a>
<a [routerLink]="['/company']" routerLinkActive="act"): ng:///AppModule/MenuComponentComponent.html#2:63
More than one component matched on this element.
[...and so on]
The development environment is as follows:
Node 7.9.0
npm 4.2.0
and the package.json of the front end is:
"dependencies": {
"#angular/animations": "^4.0.2",
"#angular/common": "^4.0.0",
"#angular/compiler": "^4.0.0",
"#angular/core": "^4.0.0",
"#angular/flex-layout": "^2.0.0-beta.8",
"#angular/forms": "^4.0.0",
"#angular/http": "^4.0.0",
"#angular/material": "^2.0.0-beta.5",
"#angular/platform-browser": "^4.0.0",
"#angular/platform-browser-dynamic": "^4.0.0",
"#angular/router": "^4.0.0",
"#covalent/core": "^1.0.0-beta.3-2",
"#covalent/dynamic-forms": "^1.0.0-beta.3-2",
"#covalent/highlight": "^1.0.0-beta.3-2",
"#covalent/http": "^1.0.0-beta.3-2",
"#covalent/markdown": "^1.0.0-beta.3-2",
"core-js": "^2.4.1",
"hammerjs": "^2.0.8",
"ngx-uploader": "^2.2.8",
"rxjs": "^5.1.0",
"zone.js": "^0.8.4"
},
"devDependencies": {
"#angular/cli": "^1.0.0",
"#angular/compiler-cli": "^4.0.0",
"#types/jasmine": "2.5.38",
"#types/node": "~6.0.60",
"codelyzer": "~2.0.0",
"jasmine-core": "~2.5.2",
"jasmine-spec-reporter": "~3.2.0",
"karma": "~1.4.1",
"karma-chrome-launcher": "~2.0.0",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^0.2.0",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.0",
"ts-node": "~2.0.0",
"tslint": "~4.5.0",
"typescript": "~2.2.0"
}
We have verified that we all 3 are on the same versions of node, npm, all the same packages and we are at the same commit on the same branch, but whenever we do ng serve on the Mac computer everything loads correctly on the node console but the above error appears when trying to load the app, but on the Windows environments we are unable to reproduce the issue as everything works fine and as expected.
We have deleted and cloned the project and done npm install several times, deleted just the node_modules folder and reinstalled them, reinstalled node and npm, called the ng from the global package or the local one, and so on, none has worked so far.
I have done some searches and it seems it appeared to some people on earlier versions of angular 2 but most of them were fixed by updating packages, and as we 3 have the same we don't think that is the problem, has anyone else faced something similar? We are pretty much clueless at this point.
Thank you in advance for the help.
Edit: I have to add that this started happening since I updated the project from the angular-cli beta to the stable release and angular from 2.3.1 to 4.0.2.
I fixed it.
Clearing it all and cloning the project again then deleting all the '^' from the package.json everything worked as expected. It was probably an updated package from something that was making the conflict.