You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I check demo apps all of them is in Typescript. I am using Javascript and Vue. I generate project tns init and I load socketio module with tns plugin add. Project works fine, but when I added socketio plugin. I am getting "ReferenceError: io is not defined"
I checked previous issues and demo app. I saw same issues, but I tried everything and my problem is not solved.
Which platform(s) does your issue occur on?
Android
Android Version: 8.0.0
Device
Please, provide the following version numbers that your issue occurs with:
Please, tell us how to recreate the issue in as much detail as possible.
I generate template project with "tns init" command after that I add socketio module with "tns add plugin" command. After that, change app.js like below
import Vue from "nativescript-vue";
import Home from "./components/Home";
const SocketIO = require('nativescript-socketio').SocketIO;
const socket = new SocketIO('http://192.168.1.122:3000/', {});
new Vue({
template: `
<Frame>
<Home />
</Frame>`,
components: {
Home
},
mounted: function() {
socket.connect()
}
}).$start();
If I remove socket io object from code. Code works fine, otherwise it gives "io is not defined" error. There is no any usage of socket module except app.js
Thanks in advance.
The text was updated successfully, but these errors were encountered:
I check demo apps all of them is in Typescript. I am using Javascript and Vue. I generate project tns init and I load socketio module with tns plugin add. Project works fine, but when I added socketio plugin. I am getting "ReferenceError: io is not defined"
I checked previous issues and demo app. I saw same issues, but I tried everything and my problem is not solved.
Which platform(s) does your issue occur on?
Please, provide the following version numbers that your issue occurs with:
"nativescript": {
"platforms": {
"ios": "5.0.0",
"android": "5.0.0"
}
},
"version": "6.1.2"
"nativescript": {
"id": "org.nativescript.example",
"tns-ios": {
"version": "6.1.0"
},
"tns-android": {
"version": "6.1.2"
}
},
"dependencies": {
"nativescript-socketio": "^3.3.1",
"nativescript-theme-core": "~1.0.6",
"nativescript-vue": "~2.4.0",
"socket.io": "^2.3.0",
"socket.io-client": "^2.3.0",
"tns-core-modules": "~6.1.0"
},
"devDependencies": {
"@babel/core": "~7.1.0",
"@babel/preset-env": "~7.1.0",
"babel-loader": "~8.0.0",
"nativescript-dev-webpack": "~1.2.0",
"nativescript-vue-template-compiler": "~2.4.0",
"node-sass": "^4.7.1",
"vue-loader": "~15.4.0"
},
Please, tell us how to recreate the issue in as much detail as possible.
I generate template project with "tns init" command after that I add socketio module with "tns add plugin" command. After that, change app.js like below
If I remove socket io object from code. Code works fine, otherwise it gives "io is not defined" error. There is no any usage of socket module except app.js
Thanks in advance.
The text was updated successfully, but these errors were encountered: