i forgot to show you errors and my configuration
errors:
WARNING in ./node_modules/cluster/lib/master.js
133:18-52 Critical dependency: the request of a dependency is an expression
@ ./node_modules/cluster/lib/master.js
@ ./node_modules/cluster/lib/cluster.js
@ ./node_modules/cluster/index.js
@ ./node_modules/colyseus/lib/ClusterServer.js
@ ./node_modules/colyseus/lib/index.js
@ ./index.ts
WARNING in ./node_modules/express/lib/view.js
81:13-25 Critical dependency: the request of a dependency is an expression
@ ./node_modules/express/lib/view.js
@ ./node_modules/express/lib/application.js
@ ./node_modules/express/lib/express.js
@ ./node_modules/express/index.js
@ ./index.ts
WARNING in ./node_modules/uws/uws_linux_46.node
Module parse failed: Unexpected character '' (1:0)
You may need an appropriate loader to handle this file type.
(Source code omitted for this binary file)
@ ./node_modules/uws ^\.\/uws_.*$
@ ./node_modules/uws/uws.js
@ ./node_modules/colyseus/lib/Server.js
@ ./node_modules/colyseus/lib/index.js
@ ./index.ts
WARNING in ./node_modules/uws/uws_linux_47.node
Module parse failed: Unexpected character '' (1:0)
You may need an appropriate loader to handle this file type.
(Source code omitted for this binary file)
@ ./node_modules/uws ^\.\/uws_.*$
@ ./node_modules/uws/uws.js
@ ./node_modules/colyseus/lib/Server.js
@ ./node_modules/colyseus/lib/index.js
@ ./index.ts
WARNING in ./node_modules/uws/uws_linux_57.node
Module parse failed: Unexpected character '' (1:0)
You may need an appropriate loader to handle this file type.
(Source code omitted for this binary file)
@ ./node_modules/uws ^\.\/uws_.*$
@ ./node_modules/uws/uws.js
@ ./node_modules/colyseus/lib/Server.js
@ ./node_modules/colyseus/lib/index.js
@ ./index.ts
WARNING in ./node_modules/uws/uws_linux_48.node
Module parse failed: Unexpected character '' (1:0)
You may need an appropriate loader to handle this file type.
(Source code omitted for this binary file)
@ ./node_modules/uws ^\.\/uws_.*$
@ ./node_modules/uws/uws.js
@ ./node_modules/colyseus/lib/Server.js
@ ./node_modules/colyseus/lib/index.js
@ ./index.ts
WARNING in ./node_modules/uws/uws_linux_51.node
Module parse failed: Unexpected character '' (1:0)
You may need an appropriate loader to handle this file type.
(Source code omitted for this binary file)
@ ./node_modules/uws ^\.\/uws_.*$
@ ./node_modules/uws/uws.js
@ ./node_modules/colyseus/lib/Server.js
@ ./node_modules/colyseus/lib/index.js
@ ./index.ts
WARNING in ./node_modules/uws/uws_darwin_46.node
Module parse failed: Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type.
(Source code omitted for this binary file)
@ ./node_modules/uws ^\.\/uws_.*$
@ ./node_modules/uws/uws.js
@ ./node_modules/colyseus/lib/Server.js
@ ./node_modules/colyseus/lib/index.js
@ ./index.ts
WARNING in ./node_modules/uws/uws_darwin_48.node
Module parse failed: Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type.
(Source code omitted for this binary file)
@ ./node_modules/uws ^\.\/uws_.*$
@ ./node_modules/uws/uws.js
@ ./node_modules/colyseus/lib/Server.js
@ ./node_modules/colyseus/lib/index.js
@ ./index.ts
WARNING in ./node_modules/uws/uws_darwin_57.node
Module parse failed: Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type.
(Source code omitted for this binary file)
@ ./node_modules/uws ^\.\/uws_.*$
@ ./node_modules/uws/uws.js
@ ./node_modules/colyseus/lib/Server.js
@ ./node_modules/colyseus/lib/index.js
@ ./index.ts
WARNING in ./node_modules/uws/uws_darwin_47.node
Module parse failed: Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type.
(Source code omitted for this binary file)
@ ./node_modules/uws ^\.\/uws_.*$
@ ./node_modules/uws/uws.js
@ ./node_modules/colyseus/lib/Server.js
@ ./node_modules/colyseus/lib/index.js
@ ./index.ts
WARNING in ./node_modules/uws/uws_darwin_51.node
Module parse failed: Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type.
(Source code omitted for this binary file)
@ ./node_modules/uws ^\.\/uws_.*$
@ ./node_modules/uws/uws.js
@ ./node_modules/colyseus/lib/Server.js
@ ./node_modules/colyseus/lib/index.js
@ ./index.ts
WARNING in ./node_modules/uws/uws_win32_48.node
Module parse failed: Unexpected character '�' (1:2)
You may need an appropriate loader to handle this file type.
(Source code omitted for this binary file)
@ ./node_modules/uws ^\.\/uws_.*$
@ ./node_modules/uws/uws.js
@ ./node_modules/colyseus/lib/Server.js
@ ./node_modules/colyseus/lib/index.js
@ ./index.ts
WARNING in ./node_modules/uws/uws_win32_51.node
Module parse failed: Unexpected character '�' (1:2)
You may need an appropriate loader to handle this file type.
(Source code omitted for this binary file)
@ ./node_modules/uws ^\.\/uws_.*$
@ ./node_modules/uws/uws.js
@ ./node_modules/colyseus/lib/Server.js
@ ./node_modules/colyseus/lib/index.js
@ ./index.ts
WARNING in ./node_modules/uws/uws_win32_57.node
Module parse failed: Unexpected character '�' (1:2)
You may need an appropriate loader to handle this file type.
(Source code omitted for this binary file)
@ ./node_modules/uws ^\.\/uws_.*$
@ ./node_modules/uws/uws.js
@ ./node_modules/colyseus/lib/Server.js
@ ./node_modules/colyseus/lib/index.js
@ ./index.ts
ERROR in ./node_modules/cluster/lib/master.js
Module not found: Error: Can't resolve 'child_process' in 'D:\projekty\unity\UnitySocketIO\server_colyseus_typescript_phaser\node_modules\cluster\lib'
@ ./node_modules/cluster/lib/master.js 15:12-36
@ ./node_modules/cluster/lib/cluster.js
@ ./node_modules/cluster/index.js
@ ./node_modules/colyseus/lib/ClusterServer.js
@ ./node_modules/colyseus/lib/index.js
@ ./index.ts
ERROR in ./node_modules/cluster/lib/worker.js
Module not found: Error: Can't resolve 'child_process' in 'D:\projekty\unity\UnitySocketIO\server_colyseus_typescript_phaser\node_modules\cluster\lib'
@ ./node_modules/cluster/lib/worker.js 13:12-36
@ ./node_modules/cluster/lib/master.js
@ ./node_modules/cluster/lib/cluster.js
@ ./node_modules/cluster/index.js
@ ./node_modules/colyseus/lib/ClusterServer.js
@ ./node_modules/colyseus/lib/index.js
@ ./index.ts
ERROR in ./node_modules/colyseus/lib/cluster/Master.js
Module not found: Error: Can't resolve 'child_process' in 'D:\projekty\unity\UnitySocketIO\server_colyseus_typescript_phaser\node_modules\colyseus\lib\cluster'
@ ./node_modules/colyseus/lib/cluster/Master.js 5:20-44
@ ./node_modules/colyseus/lib/ClusterServer.js
@ ./node_modules/colyseus/lib/index.js
@ ./index.ts
ERROR in ./node_modules/cluster/lib/master.js
Module not found: Error: Can't resolve 'dgram' in 'D:\projekty\unity\UnitySocketIO\server_colyseus_typescript_phaser\node_modules\cluster\lib'
@ ./node_modules/cluster/lib/master.js 25:12-28
@ ./node_modules/cluster/lib/cluster.js
@ ./node_modules/cluster/index.js
@ ./node_modules/colyseus/lib/ClusterServer.js
@ ./node_modules/colyseus/lib/index.js
@ ./index.ts
ERROR in ./node_modules/cluster/lib/master.js
Module not found: Error: Can't resolve 'dns' in 'D:\projekty\unity\UnitySocketIO\server_colyseus_typescript_phaser\node_modules\cluster\lib'
@ ./node_modules/cluster/lib/master.js 440:6-20
@ ./node_modules/cluster/lib/cluster.js
@ ./node_modules/cluster/index.js
@ ./node_modules/colyseus/lib/ClusterServer.js
@ ./node_modules/colyseus/lib/index.js
@ ./index.ts
ERROR in ./node_modules/cluster/lib/plugins/repl.js
Module not found: Error: Can't resolve 'repl' in 'D:\projekty\unity\UnitySocketIO\server_colyseus_typescript_phaser\node_modules\cluster\lib\plugins'
@ ./node_modules/cluster/lib/plugins/repl.js 13:11-26
@ ./node_modules/cluster/lib/plugins ^\.\/.*$
@ ./node_modules/cluster/lib/cluster.js
@ ./node_modules/cluster/index.js
@ ./node_modules/colyseus/lib/ClusterServer.js
@ ./node_modules/colyseus/lib/index.js
@ ./index.ts
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! colyseus-examples@1.0.0 webpack:dev: `webpack --config webpack.config.dev.js --progress --colors`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the colyseus-examples@1.0.0 webpack:dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Rafal\AppData\Roaming\npm-cache\_logs\2018-01-21T20_32_39_923Z-debug.log
webpack.config
const webpack = require('webpack');
const path = require('path');
const phaserModule = path.join(__dirname, '/node_modules/phaser-ce/build/custom/');
const assets = path.join(__dirname, 'assets/');
const phaser = path.join(phaserModule, 'phaser-split.js');
const pixi = path.join(phaserModule, 'pixi.js');
const p2 = path.join(phaserModule, 'p2.js');
module.exports = {
entry: path.join(__dirname, 'index.ts'),
output: {
path: path.join(__dirname, 'dist'),
filename: 'server.js'
},
module: {
rules: [
{ test: /\.ts$/, enforce: 'pre', loader: 'tslint-loader' },
{ test: /assets(\/|\\)/, loader: 'file-loader?name=assets/[hash].[ext]' },
{ test: /pixi\.js$/, loader: 'expose-loader?PIXI' },
{ test: /phaser-split\.js$/, loader: 'expose-loader?Phaser' },
{ test: /p2\.js$/, loader: 'expose-loader?p2' },
{ test: /\.ts$/, loader: 'ts-loader', exclude: '/node_modules/' }
]
},
node: {
fs: 'empty',
net: 'empty',
tls: 'empty',
},
resolve: {
extensions: ['.ts', '.js'],
alias: {
pixi: path.join(__dirname, 'node_modules/phaser-ce/build/custom/pixi.js'),
phaser: path.join(__dirname, 'node_modules/phaser-ce/build/custom/phaser-split.js'),
p2: path.join(__dirname, 'node_modules/phaser-ce/build/custom/p2.js'),
assets: path.join(__dirname, 'assets/')
}
},
devtool: 'source-map',
};