Closed BlackCat1606 closed 6 years ago
i just solved the issue by changing the type of the variable socket which was io.socket.client.Socket to any in the file socketio.android.d.ts which solved the problem for me .
I face this issue as well
@IdanDavidi did you solve it ?
@BlackCat1606 Your suggestion works but this is not a solution, this is not reasonable to change the socketio.android.d.ts
file under node_modules
.
I suspect it has something to do with the typescript version. I am using 2.7.2, what is your version?
2.6.2 , it didn't seem reasonable also to me , i tried other typescript versions but still the same problem
@BlackCat1606 maybe you should reopen the issue
@IdanDavidi , i will reopen it
I have the same issue.
Hi,
if declared socketio: any (by @BlackCat1606) dont work; your must do the following, normally it will work
tns platform remove android
tns platform add android
@kefahB , well it worked for me , but unless we got a response from the repo owner , we still don't have a clue about the solution , so please @triniwiz be more active and answer this issue
@BlackCat1606 if you see this PR the type of socket is any and it was modified...
It work now, you can continue working until we have the return of @triniwiz ;-)
@triniwiz ðŸ¤
I have the same issue!
same here
node_modules/nativescript-socketio/socketio.android.d.ts(3,23): error TS2503: Cannot find namespace 'io'.
node_modules/nativescript-socketio/socketio.android.d.ts(3,23): error TS2503: Cannot find namespace 'io'.
node_modules/nativescript-socketio/socketio.android.d.ts(3,23): error TS2503: Cannot find namespace 'io'.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
node_modules/nativescript-socketio/socketio.android.d.ts(3,23): error TS2503: Cannot find namespace 'io'.
node_modules/nativescript-socketio/socketio.android.d.ts(3,23): error TS2503: Cannot find namespace 'io'.
node_modules/nativescript-socketio/socketio.android.d.ts(3,23): error TS2503: Cannot find namespace 'io'.
node_modules/nativescript-socketio/socketio.android.d.ts(3,23): error TS2503: Cannot find namespace 'io'.
node_modules/nativescript-socketio/socketio.android.d.ts(3,23): error TS2503: Cannot find namespace 'io'.
node_modules/nativescript-socketio/socketio.android.d.ts(3,23): error TS2503: Cannot find namespace 'io'.
Same issue, @BlackCat1606 workaround worked for me.
Same issue here. It seems that it can't detect types that are in typings folder. Any solution?
@grendizeras did you try the work around that i talked about earlier in this issue ?
@BlackCat1606 Yes I did, but it is temporary solution. Thanks BTW.
Hi everyone can you paste your tns android version thanks
@triniwiz Thanks for your for reply
"tns-android": {
"version": "4.1.3"
}
"tns-android": { "version": "4.1.3" }
"typescript": "~2.7.2",
Here "tns-android": { "version": "4.1.3" }
Looks like everyone is on v4 so all that’s needs to be done is update the include.gradle
I have no include.gradle file in projet_name/platforms/android/
@kefahB it’s in the node_modules/pluginname
@triniwiz There is no include.gradle also ! can you explain for us what we must do in details please :-)
I've found an include.gradle in node_modules/nativescript-socketio/platforms/android but no clue how to update it. Follow file content
//
android {
}
dependencies { compile('io.socket:socket.io-client:0.8.2') { exclude group: 'org.json', module: 'json' } }
Hi , i was trying out the demo-ng and i've got this error while executing : tns run android .
node_modules/nativescript-socketio/socketio.android.d.ts(3,23): error TS2503: Cannot find namespace 'io'
can you help please