Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebSocketFrame is not defined #17

Closed
Samuell1 opened this issue Dec 22, 2016 · 6 comments
Closed

WebSocketFrame is not defined #17

Samuell1 opened this issue Dec 22, 2016 · 6 comments
Assignees
Labels

Comments

@Samuell1
Copy link

Samuell1 commented Dec 22, 2016

Hey, after setuping websocket i get this error,
anybody know what i need to change?

Uncaught ReferenceError: WebSocketFrame is not defined

My connection code:

import ApolloClient, { createNetworkInterface, addTypename } from 'apollo-client';

import { Client } from 'subscriptions-transport-ws';
import VueApollo, { addGraphQLSubscriptions } from 'vue-apollo'

const networkInterface = createNetworkInterface({
  uri: 'http://localhost/graphql',
  transportBatching: true,
});

const wsClient = new Client('ws://localhost:3030');

const networkInterfaceWithSubscriptions = addGraphQLSubscriptions(
  networkInterface,
  wsClient,
);

const apolloClient = new ApolloClient({
  networkInterface: networkInterfaceWithSubscriptions,
});

Vue.use(VueApollo, {
  apolloClient,
});

and some missing files

 WARNING in ./app/~/websocket/lib/BufferUtil.js                                                                                                         
 Module not found: Error: Cannot resolve 'file' or 'directory' ../build/Release/bufferutil in C:\laragon\www\vet-desktop\app\node_modules\websocket\lib 
  @ ./app/~/websocket/lib/BufferUtil.js 9:19-57                                                                                                         
                                                                                                                                                        
 WARNING in ./app/~/websocket/lib/BufferUtil.js                                                                                                         
 Module not found: Error: Cannot resolve 'file' or 'directory' ../build/default/bufferutil in C:\laragon\www\vet-desktop\app\node_modules\websocket\lib 
  @ ./app/~/websocket/lib/BufferUtil.js 11:19-57                                                                                                        
                                                                                                                                                        
 WARNING in ./app/~/websocket/lib/Validation.js                                                                                                         
 Module not found: Error: Cannot resolve 'file' or 'directory' ../build/Release/validation in C:\laragon\www\vet-desktop\app\node_modules\websocket\lib 
  @ ./app/~/websocket/lib/Validation.js 9:21-59                                                                                                         
                                                                                                                                                        
 WARNING in ./app/~/websocket/lib/Validation.js                                                                                                         
 Module not found: Error: Cannot resolve 'file' or 'directory' ../build/default/validation in C:\laragon\www\vet-desktop\app\node_modules\websocket\lib 
  @ ./app/~/websocket/lib/Validation.js 11:21-59                         
@felisio
Copy link

felisio commented Dec 23, 2016

(+1)

@Akryum Akryum self-assigned this Dec 23, 2016
@Akryum Akryum added the bug label Dec 23, 2016
@Samuell1
Copy link
Author

i forget to say, that error is for Client on line const wsClient = new Client('ws://localhost:3030');

@Samuell1
Copy link
Author

Any updates?

@Akryum
Copy link
Member

Akryum commented Dec 29, 2016

I'll investigate this when at home, but at first it seems related to apollo client.

@Samuell1
Copy link
Author

Thanks for response, i try it to test it more if i find something i say it here

@Akryum
Copy link
Member

Akryum commented Dec 29, 2016

You can re-post this issue in the subscriptions-transport-ws.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants