socketstream icon indicating copy to clipboard operation
socketstream copied to clipboard

Uncaught Error: Cannot find module 'socketstream-session' within '.'

Open aaroncalderon opened this issue 9 years ago • 14 comments

I recently tried to check if #602 had been addressed in #603, however, in the process I found that the sample app has stopped working.

Once the instructions have been followed and a new app has been installed/created by...

npm install -g socketstream 
socketstream new my_app 
cd my_app 
node app

and I open `http://localhost:300' I get a console error:

Uncaught Error: Cannot find module 'socketstream-session' within '.'require.   @ N1u0-IcUe.js?mod=loader:43
window.require                @ N1u0-IcUe.js?mod=loader:4
require_                      @ N1u0-IcUe.js?mod=loader:89
exports.assignTransport       @ N1u0-IcUe.js?mod=socketstream:18
(anonymous function)          @ (index):25

So, I traced the error back to the client's socketstream.js file.

Where is socketstream-session located?

Thanks.

aaroncalderon avatar Dec 28 '15 17:12 aaroncalderon

i have the same probleme Uncaught Error: Cannot find module 'socketstream-session' within '.'

dalily avatar Jan 26 '16 03:01 dalily

I will have a look at it. In the meantime 0.4.x is the stable version

thepian avatar Feb 02 '16 18:02 thepian

@thepian Will you be publishing the socketstream-session package? And what is the current status with the project?

msand avatar May 06 '16 15:05 msand

Jute for more information i work on Mac OS X, Tnx a lot @thepian

dalily avatar May 06 '16 15:05 dalily

Sorry I've been quite busy lately, will get back to it ASAP. Version 0.4 is supposed to be the stable version 0.5 is work-in-progress.

OS X here as well

thepian avatar May 22 '16 17:05 thepian

Ok, great :)

msand avatar May 23 '16 09:05 msand

for so long time,the problem happens same here now.

yanzixiang avatar Mar 18 '17 07:03 yanzixiang

I'll take a look.

paulbjensen avatar Mar 18 '17 07:03 paulbjensen

@yanzixiang can I check what version of SocketStream you were using? Thanks.

paulbjensen avatar Mar 18 '17 08:03 paulbjensen

Probably the 0.5.3 version / develop branch

msand avatar Mar 18 '17 08:03 msand

require('socketstream-session') is mentioned in three places: https://github.com/socketstream/socketstream/blob/develop/lib/websocket/transports/sockjs/wrapper.js#L21 https://github.com/socketstream/socketstream/blob/develop/lib/client/system/modules/socketstream.js#L17 https://github.com/socketstream/socketstream/blob/develop/lib/websocket/transports/engineio/wrapper.js#L25 But the socketstream-session package doesn't exist in npm/github

msand avatar Mar 18 '17 08:03 msand

This might be the item in question:

https://github.com/socketstream/socketstream-cookie-session https://www.npmjs.com/package/socketstream-cookie-session

I will dig a bit further.

paulbjensen avatar Mar 19 '17 15:03 paulbjensen

This seems to work at least: npm install -g [email protected] socketstream new testssproj cd testssproj npm install npm install [email protected] npm install chokidar node app.js open localhost:3000 So, the relevant parts are probably isolated to this: https://github.com/socketstream/socketstream/compare/0.5.2...develop and https://github.com/socketstream/socketstream-cookie-session

msand avatar Mar 20 '17 00:03 msand

More specifically, these: https://github.com/socketstream/socketstream/compare/ba6d09f6194aef469c5c9c85486a31b15a6bd840...c6d357d2db6f981625a5efe09cdadd8a0533208d

msand avatar Mar 20 '17 00:03 msand