Giter Site home page Giter Site logo

leemason / rebound-client Goto Github PK

View Code? Open in Web Editor NEW
7.0 7.0 0.0 154 KB

Channel authenticated websocket client for use with Laravel (inspired by echo, uses engine.io websockets).

Home Page: https://leemason.co.uk/rebound-a-channel-authenticated-websocket-implementation/

License: MIT License

JavaScript 100.00%

rebound-client's People

Contributors

leemason avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

rebound-client's Issues

Unexpected token: name (Channel)

Sorry for opening the first issue :)

thank you for the engine.io Client and Server i like very much.

I tested with fresh Laravel installation and Laravel Elixir with webpack (All Default)

app.js contains only..

import Socket from 'rebound-client';

window._socket = new Socket('app.dev:3000');

Only when I run gulp --production I receive the following error

{ Error
    at new JS_Parse_Error (eval at <anonymous> (/Users/tt/Desktop/app/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:1534:18)
    at js_error (eval at <anonymous> (/Users/tt/Desktop/app/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:1542:11)
    at croak (eval at <anonymous> (/Users/tt/Desktop/app/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:2089:9)
    at token_error (eval at <anonymous> (/Users/tt/Desktop/app/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:2097:9)
    at unexpected (eval at <anonymous> (/Users/tt/Desktop/app/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:2103:9)
    at semicolon (eval at <anonymous> (/Users/tt/Desktop/app/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:2123:56)
    at simple_statement (eval at <anonymous> (/Users/tt/Desktop/app/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:2314:73)
    at eval (eval at <anonymous> (/Users/tt/Desktop/app/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:2183:19)
    at eval (eval at <anonymous> (/Users/tt/Desktop/app/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:2136:24)
    at block_ (eval at <anonymous> (/Users/tt/Desktop/app/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:2429:20)
  message: '/Users/tt/Desktop/app/app.js: SyntaxError: Unexpected token: name (Channel)',
  fileName: '/Users/tt/Desktop/app/app.js',
  lineNumber: 1942,
  stack: 'Error\n    at new JS_Parse_Error (eval at <anonymous> (/Users/tt/Desktop/app/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:1534:18)\n    at js_error (eval at <anonymous> (/Users/tt/Desktop/app/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:1542:11)\n    at croak (eval at <anonymous> (/Users/tt/Desktop/app/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:2089:9)\n    at token_error (eval at <anonymous> (/Users/tt/Desktop/app/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:2097:9)\n    at unexpected (eval at <anonymous> (/Users/tt/Desktop/app/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:2103:9)\n    at semicolon (eval at <anonymous> (/Users/tt/Desktop/app/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:2123:56)\n    at simple_statement (eval at <anonymous> (/Users/tt/Desktop/app/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:2314:73)\n    at eval (eval at <anonymous> (/Users/tt/Desktop/app/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:2183:19)\n    at eval (eval at <anonymous> (/Users/tt/Desktop/app/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:2136:24)\n    at block_ (eval at <anonymous> (/Users/tt/Desktop/app/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:2429:20)',
  showStack: false,
  showProperties: true,
  plugin: 'gulp-uglify' }

otherwise if i run only gulp, everything seems to work perfect

With Rollup

in both cases gulp and gulp --production I receive the following error

[18:02:14] Using gulpfile ~/Desktop/app/gulpfile.js
[18:02:14] Starting 'all'...
[18:02:14] Starting 'rollup'...
preferring built-in module 'events' over local alternative at '/Users/tt/Desktop/app/node_modules/events/events.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
preferring built-in module 'events' over local alternative at '/Users/tt/Desktop/app/node_modules/events/events.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
Treating 'events' as external dependency
preferring built-in module 'events' over local alternative at '/Users/tt/Desktop/app/node_modules/events/events.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
preferring built-in module 'events' over local alternative at '/Users/tt/Desktop/app/node_modules/events/events.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
[18:02:14] gulp-notify: [Laravel Elixir] Rollup Compilation Failed!: 'Socket' is not exported by node_modules/engine.io-client/index.js (imported by node_modules/rebound-client/src/index.js). For help fixing this error see https://github.com/rollup/rollup/wiki/Troubleshooting#name-is-not-exported-by-module
Error: 'Socket' is not exported by node_modules/engine.io-client/index.js (imported by node_modules/rebound-client/src/index.js). For help fixing this error see https://github.com/rollup/rollup/wiki/Troubleshooting#name-is-not-exported-by-module
    at Module.trace (/Users/tt/Desktop/app/node_modules/rollup/dist/rollup.js:7739:29)
    at ModuleScope.findDeclaration (/Users/tt/Desktop/app/node_modules/rollup/dist/rollup.js:7361:22)
    at Scope.findDeclaration (/Users/tt/Desktop/app/node_modules/rollup/dist/rollup.js:5361:39)
    at Scope.findDeclaration (/Users/tt/Desktop/app/node_modules/rollup/dist/rollup.js:5361:39)
    at Node.bind (/Users/tt/Desktop/app/node_modules/rollup/dist/rollup.js:6516:29)
    at /Users/tt/Desktop/app/node_modules/rollup/dist/rollup.js:5155:50
    at Node.eachChild (/Users/tt/Desktop/app/node_modules/rollup/dist/rollup.js:5172:5)
    at Node.bind (/Users/tt/Desktop/app/node_modules/rollup/dist/rollup.js:5155:7)
    at /Users/tt/Desktop/app/node_modules/rollup/dist/rollup.js:5155:50
    at Node.eachChild (/Users/tt/Desktop/app/node_modules/rollup/dist/rollup.js:5172:5)

thanks in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.