Comments (6)
Having the same error. import SocketIO = require("nativescript-socket.io");
However, this worked: var SocketIO = require('nativescript-socket.io');
But now I'm getting error "io is not defined".
I presume I don't have those dependencies? How do I get them/install them?
Android: Socket.IO-client Java v0.8.* iOS: Socket.IO-Client-Swift v8.1.*
I see that in include.gradle
file you specify it as a dependency:
dependencies { compile ('io.socket:socket.io-client:0.8.+') { exclude group: 'org.json', module: 'json' } }
Upon further research (https://docs.nativescript.org/plugins/plugins#includegradle-specification):
Any native dependencies should be available in jcenter or from the Android SDK installed on your machine.
I doubt this library is locally on Android SDK, so probably we are getting it from here: https://bintray.com/bintray/jcenter/io.socket%3Asocket.io-client
In socket.d.ts
file, I see 2 errors:
First - public android: io.socket.client.Socket;
- here is where the io cannot be found.
Second - import * as helpers from "./helpers";
- says "Import or Export declaration is an ambient module declaration cannot reference module through relative module name"
from nativescript-socket.io.
checking this issue...
native dependencies are added when plugin is installed.
otherwise I have this working on in a JavaScript-based app on both iOS and Android. I probabaly need to check with TypeScript.
from nativescript-socket.io.
reopened
from nativescript-socket.io.
please check v0.2.3 .. should be fine
from nativescript-socket.io.
Thank you, it works now :)
from nativescript-socket.io.
its working,Thanks @naderio
from nativescript-socket.io.
Related Issues (20)
- Reconnection
- need upgrade to {N} V4 ? HOT 2
- Can I use this plugin in NativeScript Angular? HOT 1
- IOS `init` is depricated HOT 8
- strange behavior can't build nativescript-socket.io HOT 3
- iOS Swift 4.0 Build Failed HOT 1
- Use websocket only on android HOT 22
- Plugin is not compatible with xcode 10.2 HOT 4
- Flavor 'nativescript-socket.io' has unknown dimension 'nativescriptsocketio' HOT 1
- Deprecated? HOT 1
- use with feathersjs HOT 1
- Not working on android :( HOT 23
- tns plugin add nativescript-socket.io is not working with 0.11.0 HOT 1
- IOS Build failed
- Event subscription never fires iOS
- Disconnect issue
- Cant connect to server without path HOT 1
- Cant connect to nodejs socket v4 with io.socket:socket.io-client v1 HOT 3
- Issue with include.gradle and keyword "compile" on NS 8 HOT 2
- Fails to build
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nativescript-socket.io.