SocketCluster / socketcluster-client

JavaScript client for SocketCluster
MIT License
292 stars 91 forks source link

JavaScript file does not get served #43

Closed eickeee closed 6 years ago

eickeee commented 8 years ago

Hey, I think I've might encountered a problem in the client. You state in the description that the js file should usually be served automatically. However, even in your sample it is not available for me. (npm install and node server.js were executed before)

screen shot 2016-02-24 at 22 33 51
jondubois commented 8 years ago

@eickeee It should work if you created your app using the socketcluster create myapp command. Otherwise, you will need to copy the file socketcluster-client/socketcluster.js to your public/ directory (public/socketcluster.js) manually.

eickeee commented 8 years ago

Well, if I create an app using the command, it puts the needed js file automatically in the public folder. However, since you offer the client on npm, I assumed that you do some magic like e.g. socket.io does (they serve the file under /socket.io/socket.io.js) and make the file available although the file is not explicitly lying in the public folder. I thought that this was the intended behaviour, that's why I was asking. But if it's not the case, I'll put the js file in the public folder manually.

deoqc commented 8 years ago

Wondering how to do this in React Native. Have to put the file manually in a directory also?

I am having the following error when I try to import:

Unable to resolve module querystring from .../app/node_modules/socketcluster-client/lib/scsocket.js:

jondubois commented 6 years ago

Hopefully this is no longer an issue. Feel free to reopen if it is.