Comments (9)
when I run:
npm install naderio/nativescript-socket.io#master
it only create the following files in the nativescript-socket.io
directory:
d---- 01.12.2016 15:54 platforms
-a--- 01.12.2016 15:54 84 .npmignore
-a--- 01.12.2016 15:54 790 common.d.ts
-a--- 01.12.2016 15:54 112 helpers.d.ts
-a--- 01.12.2016 15:54 1234 LICENSE.md
-a--- 01.12.2016 15:54 14792 package.json
-a--- 01.12.2016 15:54 9783 README.md
-a--- 01.12.2016 15:54 730 socket.d.ts
but when I run npm install nativescript-socket.io
it installs:
d---- 01.12.2016 16:12 platforms
-a--- 01.12.2016 16:12 75 .npmignore
-a--- 01.12.2016 16:12 773 common.d.ts
-a--- 01.12.2016 16:12 1381 common.js
-a--- 01.12.2016 16:12 2134 helpers.android.js
-a--- 01.12.2016 16:12 110 helpers.d.ts
-a--- 01.12.2016 16:12 1566 helpers.ios.js
-a--- 01.12.2016 16:12 1210 LICENSE.md
-a--- 01.12.2016 16:12 2886 package.json
-a--- 01.12.2016 16:12 9215 README.md
-a--- 01.12.2016 16:12 6229 socket.android.js
-a--- 01.12.2016 16:12 706 socket.d.ts
-a--- 01.12.2016 16:12 5601 socket.ios.js
But I see that you changes the default version, so running the later now installs 0.4.0 and not 0.3.0 anymore.
So I installed it using tns plugin add nativescript-socket.io
again and now that it uses 0.4.0 everything works fine.
Featherjs now runs without problems.
Thanks a lot!!!
from nativescript-socket.io.
well, try this until .once()
is implemented
const SocketIO = require('nativescript-socket.io');
SocketIO.Socket.prototype.once = function(event, fn){
function on() {
this.off(event, on);
fn.apply(this, arguments);
}
on.fn = fn;
this.on(event, on);
return this;
};
from nativescript-socket.io.
probably Emitter#listeners(event)
and Emitter#hasListeners(event)
need to be implemented as well
from nativescript-socket.io.
thanks for your fast reply.
I am using typescript and unfortunately typescript does not compile it:
app/utils/feathers.service.ts(27,16): error TS2339: Property 'fn' does not exist on type '() => void'.
This is the point where my javascript/typescript understanding is not deep enough...
from nativescript-socket.io.
that's expected with TypeScript
try removing the on.fn = fn;
instruction then .. or change it to (<any>on).fn = fn;
from nativescript-socket.io.
@fuleshu check latest on master please
from nativescript-socket.io.
Thanks for the fast fix!
Unfortunately I did not manage to test it because I just couldn't get the master version running in my app. Using the tns plugin installer installs version 0.3.0. I tried several ways I found in the net to get the latest github version into the node_modules, also tried cloning the repro there directly. But non of them would get the code working in my app :(
from nativescript-socket.io.
npm install naderio/nativescript-socket.io#master
then tns run android
or tns run ios
I've run the demo app successfully
from nativescript-socket.io.
@fuleshu recheck no please
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.