Git Product home page Git Product logo

cettia-javascript-client's Introduction

Cettia JavaScript Client

Cettia JavaScript Client is a lightweight JavaScript client for browser-based and Node-based application and distributed via the npm registry with the name, cettia-client.

Installation

script tag

Add the following script tag to your HTML.

<script src="https://cdn.jsdelivr.net/npm/cettia-client/cettia-browser.min.js"></script>
window.cettia;

Bundler

Install and load the package.

npm install cettia-client
var cettia = require('cettia-client/cettia-bundler');

Note: You should use this way to use Cettia in React Native.

Node

Install and load the package.

npm install cettia-client
var cettia = require('cettia-client');

Usage

Cettia will be familiar to people using other real-time web frameworks and libraries. You open a socket and send and receive events with Cettia's API. Here is the main.js contents which is a Node example of the Cettia Starter Kit.

const cettia = require("cettia-client");
const username = "DH";
const uri = `http://localhost:8080/cettia?username=${encodeURIComponent(username)}`;
const socket = cettia.open(uri);

const addMessage = ({sender, text}) => console.log(`${sender} sends ${text}`);
socket.on("message", addMessage);

const addSystemMessage = text => addMessage({sender: "system", text});
socket.on("connecting", () => addSystemMessage("The socket starts a connection."));
socket.on("open", () => addSystemMessage("The socket establishes a connection."));
socket.on("close", () => addSystemMessage("All transports failed to connect or the connection was disconnected."));
socket.on("waiting", (delay) => addSystemMessage(`The socket will reconnect after ${delay} ms`));

// Once a socket has opened, sends a message every 5 seconds
socket.once("open", () => setInterval(() => socket.send("message", {text: `A message - ${Date.now()}`}), 5000));

Besides a Node example, the Cettia starter kit provides Web example and React Native example which demonstrate how you can use Cettia JavaScript Client in various runtime environment.

See Also

cettia-javascript-client's People

Contributors

ddknoll avatar dependabot[bot] avatar flowersinthesand avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cettia-javascript-client's Issues

Reconnection doesn't work

To reproduce the bug, visit http://jsbin.com/rebadowilo/1/edit?html,js,console without running the server. The following error is logged in the console:

Uncaught TypeError: Cannot read property 'close' of undefined
    at Object.o.close (cettia-browser.min.js:1)
    at Object.n (cettia-browser.min.js:1)
    at Object.e (cettia-browser.min.js:1)
    at u (cettia-browser.min.js:1)
    at Object.add (cettia-browser.min.js:1)
    at Object.i.on (cettia-browser.min.js:1)
    at Object.i.once (cettia-browser.min.js:1)
    at t (cettia-browser.min.js:1)
    at Object.<anonymous> (cettia-browser.min.js:1)
    at u (cettia-browser.min.js:1)

The expected behavior is to reconnect to the server.

The total number of reconnection attempts to be passed to reconnect option is wrong

The reconnect option is a function to determine whether to schedule reconnection on this disconnection or not so that it should receive information which has been accumulated so far this disconnection. However in the current implementation the wrong total number of reconnection attempt is passed to the option. At first disconnection, 1 is passed but it should be 0 because there has never been an attempt to reconnect.

A fix to this issue won't affect to waiting event hander's arguments as it works correctly. In summary, at first disconnection, reconnect option should receive null and 0 as arguments and if it returns 500 waiting event handler should receive 500 and 1 as arguments, information about reconnection scheduled by reconnect option.

Drop support for IE 6-8 according to the death of jQuery Compat 3.0

Cettia JavaScript Client's browser support policy has been the same with the one of jQuery 1.x, and the one of jQuery Compat 3.0 was supposed to replace the one of jQuery 1.x. However, as jQuery team announces the death of jQuery Compat, now the browser support of jQuery 3.0 should be used so we don't need to support IE 6-8. (FYI, I thought it's a waste of time to try to support browsers where jQuery doesn't work)

The following fallback can be dropped:

  • util.createXMLHttpRequest for XMLHttpRequest
  • util.parseJSON and util.stringifyJSON for JSON
  • createHttpLongpollJsonpTransport for script.onreadystatechange
  • head for document.head
  • util.isArray for Array.isArray
  • Specific fallbacks for IE 6

Unfortunately, IE 9's XMLHttpRequest is not capable of cross origin operation so there will be no changes in transport factory.

Tests fail with ws 1.1+

➜  cettia-javascript-client git:(master) ✗ npm run build && npm run test

> [email protected] build /Users/donghwankim/git/cettia-javascript-client
> npm run base; npm run bundler; npm run browser; npm run browserMin


> [email protected] base /Users/donghwankim/git/cettia-javascript-client
> babel src/cettia.es6 --out-file cettia.js


> [email protected] bundler /Users/donghwankim/git/cettia-javascript-client
> NODE_ENV=browser babel src/cettia.es6 --out-file cettia-bundler.js


> [email protected] browser /Users/donghwankim/git/cettia-javascript-client
> webpack cettia-bundler.js cettia-browser.js --output-library cettia

Hash: b4020e0e204096bd69ff
Version: webpack 1.15.0
Time: 330ms
            Asset    Size  Chunks             Chunk Names
cettia-browser.js  175 kB       0  [emitted]  main
   [0] ./cettia-bundler.js 36.4 kB {0} [built]
    + 36 hidden modules

> [email protected] browserMin /Users/donghwankim/git/cettia-javascript-client
> webpack cettia-bundler.js cettia-browser.min.js --output-library cettia --optimize-minimize --optimize-occurence-order

Hash: 3fe79c98cd35f543736d
Version: webpack 1.15.0
Time: 1705ms
                Asset     Size  Chunks             Chunk Names
cettia-browser.min.js  65.8 kB       0  [emitted]  main
   [0] ./cettia-bundler.js 36.4 kB {0} [built]
    + 36 hidden modules

WARNING in cettia-browser.min.js from UglifyJs
Side effects in initialization of unused variable _traverse2 [./cettia-bundler.js:7,0]
Condition always true [./~/event-lite/event-lite.js:30,0]
Dropping unused variable MAXBUFLEN [./~/msgpack-lite/lib/buffer-lite.js:3,0]

> [email protected] test /Users/donghwankim/git/cettia-javascript-client
> grunt test

Running "test-node" task
[SECURITY] node-uuid: crypto not usable, falling back to insecure Math.random()


  client
    should open a new socket
      ✓ websocket (68ms)
      ✓ httpstream
      ✓ httplongpoll
    should close the socket
      ✓ websocket
      ✓ httpstream
      ✓ httplongpoll (3025ms)
    should exchange a text event
      ✓ websocket
      ✓ httpstream
      ✓ httplongpoll
    should exchange a binary event
      1) websocket
      ✓ httpstream
      ✓ httplongpoll
    should exchange a composite event
      2) websocket
      ✓ httpstream
      ✓ httplongpoll
    should exchange an event containing of multi-byte characters
      ✓ websocket
      ✓ httpstream
      ✓ httplongpoll
    should exchange an event of 2KB
      ✓ websocket
      ✓ httpstream
      ✓ httplongpoll
    should not lose any event in an exchange of twenty events
      ✓ websocket (38ms)
      ✓ httpstream (78ms)
      ✓ httplongpoll (133ms)
    should close the socket if heartbeat fails
      ✓ websocket (2514ms)
      ✓ httpstream (2524ms)
      ✓ httplongpoll (2517ms)
    reply
      should execute the resolve callback when receiving event
        ✓ websocket
        ✓ httpstream
        ✓ httplongpoll
      should execute the reject callback when receiving event
        ✓ websocket
        ✓ httpstream
        ✓ httplongpoll
      should execute the resolve callback when sending event
        ✓ websocket
        ✓ httpstream
        ✓ httplongpoll
      should execute the reject callback when sending event
        ✓ websocket
        ✓ httpstream
        ✓ httplongpoll


  37 passing (11s)
  2 failing

  1) client should exchange a binary event websocket:
     Uncaught Error: Invalid type: undefined
    at Codec.decode (node_modules/msgpack-lite/lib/read-core.js:24:22)
    at DecodeBuffer.fetch (node_modules/msgpack-lite/lib/decode-buffer.js:26:21)
    at DecodeBuffer.read (node_modules/msgpack-lite/lib/flex-buffer.js:166:28)
    at Object.decode (node_modules/msgpack-lite/lib/decode.js:10:18)
    at Object.<anonymous> (cettia.js:424:41)
    at _fire (cettia.js:136:25)
    at Object.fire (cettia.js:171:9)
    at Object.self.fire (cettia.js:584:18)
    at WebSocket.ws.onmessage (cettia.js:630:14)
    at WebSocket.onMessage (node_modules/ws/lib/EventTarget.js:103:16)
    at Receiver._receiver.onmessage (node_modules/ws/lib/WebSocket.js:146:54)
    at Receiver.dataMessage (node_modules/ws/lib/Receiver.js:380:14)
    at extension.decompress (node_modules/ws/lib/Receiver.js:349:40)
    at _inflate.flush (node_modules/ws/lib/PerMessageDeflate.js:314:12)
    at afterWrite (_stream_writable.js:387:3)
    at onwrite (_stream_writable.js:378:7)
    at WritableState.onwrite (_stream_writable.js:89:5)
    at afterTransform (_stream_transform.js:79:3)
    at TransformState.afterTransform (_stream_transform.js:54:12)
    at Zlib.callback (zlib.js:639:5)
  

  2) client should exchange a composite event websocket:
     Uncaught Error: Invalid type: undefined
    at Codec.decode (node_modules/msgpack-lite/lib/read-core.js:24:22)
    at DecodeBuffer.fetch (node_modules/msgpack-lite/lib/decode-buffer.js:26:21)
    at DecodeBuffer.read (node_modules/msgpack-lite/lib/flex-buffer.js:166:28)
    at Object.decode (node_modules/msgpack-lite/lib/decode.js:10:18)
    at Object.<anonymous> (cettia.js:424:41)
    at _fire (cettia.js:136:25)
    at Object.fire (cettia.js:171:9)
    at Object.self.fire (cettia.js:584:18)
    at WebSocket.ws.onmessage (cettia.js:630:14)
    at WebSocket.onMessage (node_modules/ws/lib/EventTarget.js:103:16)
    at Receiver._receiver.onmessage (node_modules/ws/lib/WebSocket.js:146:54)
    at Receiver.dataMessage (node_modules/ws/lib/Receiver.js:380:14)
    at extension.decompress (node_modules/ws/lib/Receiver.js:349:40)
    at _inflate.flush (node_modules/ws/lib/PerMessageDeflate.js:314:12)
    at afterWrite (_stream_writable.js:387:3)
    at onwrite (_stream_writable.js:378:7)
    at WritableState.onwrite (_stream_writable.js:89:5)
    at afterTransform (_stream_transform.js:79:3)
    at TransformState.afterTransform (_stream_transform.js:54:12)
    at Zlib.callback (zlib.js:639:5)
  



Warning: Task "test-node" failed. Use --force to continue.

Aborted due to warnings.

npm ERR! Darwin 16.5.0
npm ERR! argv "/Users/donghwankim/.nvm/versions/node/v6.8.1/bin/node" "/Users/donghwankim/.nvm/versions/node/v6.8.1/bin/npm" "run" "test"
npm ERR! node v6.8.1
npm ERR! npm  v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! [email protected] test: `grunt test`
npm ERR! Exit status 3
npm ERR! 
npm ERR! Failed at the [email protected] test script 'grunt test'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the cettia-client package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     grunt test
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs cettia-client
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls cettia-client
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/donghwankim/git/cettia-javascript-client/npm-debug.log
➜  cettia-javascript-client git:(master) ✗ npm ls ws
[email protected] /Users/donghwankim/git/cettia-javascript-client
├─┬ [email protected] (git://github.com/cettia/cettia-protocol.git#6d9ca65bd0419086c31435d45d5f62b9d8a8f95d)
│ └── [email protected] 
└── [email protected] 

After a device has been woken up from suspend mode, a reconnect leads to a HeartbeatFailedException

Using the DefaultServer from cettia-server, the server disconnects the client and the client is then in an infinite-cycle trying to reconnect. It seems the client does wait too long to send a heartbeat, or the server timer expires too early. So this looks like some kind of timer issue.

io.cettia.HeartbeatFailedException
    at io.cettia.DefaultServer$DefaultServerSocket$8.run(DefaultServer.java:381)
    at java.util.TimerThread.mainLoop(Timer.java:555)
    at java.util.TimerThread.run(Timer.java:505)

Also what is the meaning of _heartbeat vs. hearbeat?

A related issue:

Also it seems when reconnecting that sometimes there are two sockets open at the same time in the same browser tab (leading to weird message transport). Here is a screenshot of the chrome network tab showing the problem with two open sockets:

image

And here is another example where one socket receives multiple chat message which have been sent from other sockets (there is only this browser tab connected):

image

I would expect a socket to only open when the other socket has been closed.

Binary event

Derived from cettia/cettia-protocol#9

With this feature, you will be able to exchange events whose data is binary without binary-to-text conversion.

  • Find MessagePack JavaScript implementation
  • Implement the default behavior of send method

Update dependencies

FYI

C:\Users\Donghwan\git\cettia-javascript-client>npm outdated
Package                                       Current  Wanted  Latest  Location
babel-cli                                      6.18.0  6.24.1  6.24.1  cettia-client
babel-plugin-transform-dead-code-elimination    2.2.1   2.2.2   2.2.2  cettia-client
babel-plugin-transform-node-env-inline          6.8.0   6.8.0   0.0.2  cettia-client
eventsource                                     0.2.0   0.2.0   1.0.0  cettia-client
grunt                                           0.4.5   0.4.5   1.0.1  cettia-client
jsdom                                           8.0.4   8.0.4  10.1.0  cettia-client
mocha                                           2.4.5   2.4.5   3.3.0  cettia-client
msgpack-lite                                   0.1.17  0.1.17  0.1.26  cettia-client
webpack                                        1.14.0  1.14.0   2.5.0  cettia-client
ws                                              1.0.1   1.0.1   2.3.1  cettia-client

React Native support

To support React Native, we need to check what objects are available on window(global) and find available transports.

Implement new and cache event

Since Alpha1, socket's life cycle's beginning and end have corresponded to open and close event respectively. Now that socket's life cycle is extended, we need a special event to define the beginning of new life cycle and the end of old life cycle and it is the new event. In other words, the period between new events is the complete life cycle of socket. It is called when the server issues a new id shortly before open event and takes no arguments.

Along with this concept, it is no longer an error but an event to send an event where there is no connection. The cache event is the very event to deal with such situation. It is called when an event is sent when there is no connection and takes an array of event name, event data, resolved callback and rejected callback.

With these events, a user can accumulate events which couldn't be sent during disconnection to a queue on cache event and send them again on next open event and manage resources including that cache sharing the same life cycle with socket on new event. For the overall context of this feature, see cettia/cettia-protocol#1.

Extend socket's life cycle over multiple pages

The most common problem of browser-based application or website utilizing full duplex connection is disconnection on page navigation including page refresh unless it is designed to be a single-page application. Now that socket's life cycle is determined by its identifier only, it is possible to extend the life cycle to other page as long as the identifier is shared between pages. Then, the server can send events which the client couldn't receive because of disconnection due to page navigation again when the client reconnects in other page.

The problem is the scope where socket id should be shared. An existing storage like cookie, session storage or local storage shares data between tabs or windows according to the origin policy. They are not adequate because socket in tab1 and socket in tab2 are and should be distinguishable. As far as I know, the only way is to use window.name. Also, it should be considered where two sockets whose uri is same are used in the same page. In summary, we need a proper scope to share socket id and how to add/remove id to/from the scope.

And one more thing - with this option, even though new event has never been called, open event may be called in some page, which is the case where the shared socket id is used and it should be considered in terms of design by contract at first. We should document about it.

Update dependencies

➜  cettia-javascript-client git:(master) ✗ npm outdated
Package                                       Current  Wanted  Latest  Location
babel-cli                                      6.18.0  6.18.0  6.26.0  cettia-client
babel-plugin-transform-dead-code-elimination    2.2.1   2.2.1   2.2.2  cettia-client
babel-plugin-transform-node-env-inline          0.0.2   0.0.2   0.4.3  cettia-client
chai                                            3.5.0   3.5.0   4.2.0  cettia-client
eventsource                                     1.0.0   1.0.0   1.0.7  cettia-client
grunt                                           1.0.1   1.0.1   1.0.4  cettia-client
jsdom                                          9.12.0  9.12.0  15.0.0  cettia-client
mocha                                           3.3.0   3.3.0   6.1.4  cettia-client
webpack                                        1.15.0  1.15.0  4.30.0  cettia-client
ws                                              5.2.2   5.2.2   7.0.0  cettia-client
➜

ArrayBuffer not sent as binary message

Hi
There is a small bug in the tutorial (or in the code):
https://cettia.io/guides/cettia-tutorial/

The tutorial states

As the example suggests, event data can be basically anything as long as it is serializable, >regardless of whether data is binary or text. If at least one of the properties of the event data to >send is one of the following,

byte[] or ByteBuffer in the server.
Buffer (Node.js only), ArrayBuffer, or Typed Arrays in the client.

I just tried to send an ArrayBuffer with send() and Cettia-Javascript sends it as text message. The reason for that is that the check if there is binary data in the message does not work for ArrayBuffer objects.

https://github.com/cettia/cettia-javascript-client/blob/master/src/cettia.es6#L556-L562

ArrayBuffer.isView(value) returns false when the value is an ArrayBuffer.
It works when I wrap the ArrayBuffer for example in an Uint8Array, cettia-javascripts sends a binary message.

Fix a typo in webpack configuration

➜  cettia-javascript-client git:(master) ✗ npm run build && npm run test

> [email protected] build /Users/donghwankim/git/cettia-javascript-client
> npm run base; npm run bundler; npm run browser; npm run browserMin


> [email protected] base /Users/donghwankim/git/cettia-javascript-client
> babel src/cettia.es6 --out-file cettia.js


> [email protected] bundler /Users/donghwankim/git/cettia-javascript-client
> NODE_ENV=browser babel src/cettia.es6 --out-file cettia-bundler.js


> [email protected] browser /Users/donghwankim/git/cettia-javascript-client
> webpack cettia-bundler.js cettia-browser.js --output-library cettia

Hash: 5291094b7d7dd1a9c88d
Version: webpack 2.5.0
Time: 690ms
            Asset    Size  Chunks             Chunk Names
cettia-browser.js  171 kB       0  [emitted]  main
   [2] ./~/msgpack-lite/lib/codec-base.js 1.21 kB {0} [built]
   [6] ./~/msgpack-lite/lib/read-core.js 1.29 kB {0} [built]
   [7] ./~/msgpack-lite/lib/write-core.js 1.7 kB {0} [built]
   [9] ./~/event-lite/event-lite.js 4.23 kB {0} [built]
  [10] ./~/msgpack-lite/lib/decode-buffer.js 623 bytes {0} [built]
  [11] ./~/msgpack-lite/lib/decode.js 228 bytes {0} [built]
  [12] ./~/msgpack-lite/lib/encode-buffer.js 629 bytes {0} [built]
  [13] ./~/msgpack-lite/lib/encode.js 229 bytes {0} [built]
  [18] ./~/msgpack-lite/lib/browser.js 297 bytes {0} [built]
  [19] ./~/traverse/index.js 8.93 kB {0} [built]
  [20] ./cettia-bundler.js 36.4 kB {0} [built]
  [28] ./~/msgpack-lite/lib/codec.js 185 bytes {0} [built]
  [29] ./~/msgpack-lite/lib/decoder.js 621 bytes {0} [built]
  [30] ./~/msgpack-lite/lib/encoder.js 580 bytes {0} [built]
  [33] ./~/msgpack-lite/lib/ext.js 144 bytes {0} [built]
    + 23 hidden modules

> [email protected] browserMin /Users/donghwankim/git/cettia-javascript-client
> webpack cettia-bundler.js cettia-browser.min.js --output-library cettia --optimize-minimize --optimize-occurence-order

webpack 2.5.0
Usage: https://webpack.js.org/api/cli/
Usage without config file: webpack <entry> [<entry>] <output>
Usage with config file: webpack

Config options:
  --config  Path to the config file
                         [string] [default: webpack.config.js or webpackfile.js]
  --env     Environment passed to the config, when it is a function

Basic options:
  --context    The root directory for resolving entry point and stats
                                       [string] [default: The current directory]
  --entry      The entry point                                          [string]
  --watch, -w  Watch the filesystem for changes                        [boolean]
  --debug      Switch loaders to debug mode                            [boolean]
  --devtool    Enable devtool for better debugging experience (Example:
               --devtool eval-cheap-module-source-map)                  [string]
  -d           shortcut for --debug --devtool eval-cheap-module-source-map
               --output-pathinfo                                       [boolean]
  -p           shortcut for --optimize-minimize --define
               process.env.NODE_ENV="production"                       [boolean]
  --progress   Print compilation progress in percentage                [boolean]

Module options:
  --module-bind       Bind an extension to a loader                     [string]
  --module-bind-post                                                    [string]
  --module-bind-pre                                                     [string]

Output options:
  --output-path                 The output path for compilation assets
                                       [string] [default: The current directory]
  --output-filename             The output filename of the bundle
                                                   [string] [default: [name].js]
  --output-chunk-filename       The output filename for additional chunks
       [string] [default: filename with [id] instead of [name] or [id] prefixed]
  --output-source-map-filename  The output filename for the SourceMap   [string]
  --output-public-path          The public path for the assets          [string]
  --output-jsonp-function       The name of the jsonp function used for chunk
                                loading                                 [string]
  --output-pathinfo             Include a comment with the request for every
                                dependency (require, import, etc.)     [boolean]
  --output-library              Expose the exports of the entry point as library
                                                                        [string]
  --output-library-target       The type for exposing the exports of the entry
                                point as library                        [string]

Advanced options:
  --records-input-path       Path to the records file (reading)         [string]
  --records-output-path      Path to the records file (writing)         [string]
  --records-path             Path to the records file                   [string]
  --define                   Define any free var in the bundle          [string]
  --target                   The targeted execution environment         [string]
  --cache                    Enable in memory caching
                      [boolean] [default: It's enabled by default when watching]
  --watch-stdin, --stdin     Exit the process when stdin is closed     [boolean]
  --watch-aggregate-timeout  Timeout for gathering changes while watching
  --watch-poll               The polling interval for watching (also enable
                             polling)                                  [boolean]
  --hot                      Enables Hot Module Replacement            [boolean]
  --prefetch                 Prefetch this request (Example: --prefetch
                             ./file.js)                                 [string]
  --provide                  Provide these modules as free vars in all modules
                             (Example: --provide jQuery=jquery)         [string]
  --labeled-modules          Enables labeled modules                   [boolean]
  --plugin                   Load this plugin                           [string]
  --bail                     Abort the compilation on first error      [boolean]
  --profile                  Profile the compilation and include information in
                             stats                                     [boolean]

Resolving options:
  --resolve-alias         Setup a module alias for resolving (Example:
                          jquery-plugin=jquery.plugin)                  [string]
  --resolve-extensions    Setup extensions that should be used to resolve
                          modules (Example: --resolve-extensions .es6 .js)
                                                                         [array]
  --resolve-loader-alias  Setup a loader alias for resolving            [string]

Optimizing options:
  --optimize-max-chunks      Try to keep the chunk count below a limit
  --optimize-min-chunk-size  Try to keep the chunk size above a limit
  --optimize-minimize        Minimize javascript and switches loaders to
                             minimizing                                [boolean]

Stats options:
  --color, --colors           Enables/Disables colors on the console
                                           [boolean] [default: (supports-color)]
  --sort-modules-by           Sorts the modules list by property in module
                                                                        [string]
  --sort-chunks-by            Sorts the chunks list by property in chunk[string]
  --sort-assets-by            Sorts the assets list by property in asset[string]
  --hide-modules              Hides info about modules                 [boolean]
  --display-exclude           Exclude modules in the output             [string]
  --display-modules           Display even excluded modules in the output
                                                                       [boolean]
  --display-max-modules       Sets the maximum number of visible modules in
                              output                                    [number]
  --display-chunks            Display chunks in the output             [boolean]
  --display-entrypoints       Display entry points in the output       [boolean]
  --display-origins           Display origins of chunks in the output  [boolean]
  --display-cached            Display also cached modules in the output[boolean]
  --display-cached-assets     Display also cached assets in the output [boolean]
  --display-reasons           Display reasons about module inclusion in the
                              output                                   [boolean]
  --display-depth             Display distance from entry point for each module
                                                                       [boolean]
  --display-used-exports      Display information about used exports in modules
                              (Tree Shaking)                           [boolean]
  --display-provided-exports  Display information about exports provided from
                              modules                                  [boolean]
  --display-error-details     Display details about errors             [boolean]
  --verbose                   Show more details                        [boolean]

Options:
  --help, -h     Show help                                             [boolean]
  --version, -v  Show version number                                   [boolean]
  --json, -j     Prints the result as JSON.                            [boolean]

Unknown argument: optimize-occurence-order

npm ERR! Darwin 16.5.0
npm ERR! argv "/Users/donghwankim/.nvm/versions/node/v6.8.1/bin/node" "/Users/donghwankim/.nvm/versions/node/v6.8.1/bin/npm" "run" "browserMin"
npm ERR! node v6.8.1
npm ERR! npm  v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! [email protected] browserMin: `webpack cettia-bundler.js cettia-browser.min.js --output-library cettia --optimize-minimize --optimize-occurence-order`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] browserMin script 'webpack cettia-bundler.js cettia-browser.min.js --output-library cettia --optimize-minimize --optimize-occurence-order'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the cettia-client package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     webpack cettia-bundler.js cettia-browser.min.js --output-library cettia --optimize-minimize --optimize-occurence-order
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs cettia-client
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls cettia-client
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/donghwankim/git/cettia-javascript-client/npm-debug.log

npm ERR! Darwin 16.5.0
npm ERR! argv "/Users/donghwankim/.nvm/versions/node/v6.8.1/bin/node" "/Users/donghwankim/.nvm/versions/node/v6.8.1/bin/npm" "run" "build"
npm ERR! node v6.8.1
npm ERR! npm  v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! [email protected] build: `npm run base; npm run bundler; npm run browser; npm run browserMin`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] build script 'npm run base; npm run bundler; npm run browser; npm run browserMin'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the cettia-client package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run base; npm run bundler; npm run browser; npm run browserMin
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs cettia-client
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls cettia-client
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/donghwankim/git/cettia-javascript-client/npm-debug.log

Release needed for webpack compatible version

Hey Donghwan,
We should get a new point release for the javascript client. We should also get this updated version up on NPM so that people can follow the Readme on github for installation.

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.