loomnetwork / tiles-chain

MIT License
18 stars 9 forks source link

Typescript error when starting #3

Closed alexjfno1 closed 6 years ago

alexjfno1 commented 6 years ago

When running yarn start a Typescript error occurs.

Using Node 8.10.0

13:25 - [master !?] - ~/Projects/tiles-chain/webclient => yarn start
yarn run v1.7.0
$ webpack-dev-server -d --inline --progress --no-info --host 0.0.0.0 --port 9000
 http://0.0.0.0:9000/
webpack result is served from /
content is served from /Users/XXXX/Projects/tiles-chain/webclient
ts-loader: Using typescript@2.9.2 and /Users/XXXX/Projects/tiles-chain/webclient/tsconfig.json
Hash: c649fc5f1fff59fc2fb4
Version: webpack 3.11.0
Time: 5554ms
 2 assets
   [1] (webpack)/buildin/global.js 509 bytes {1} [built]
  [68] (webpack)-dev-server/client?http://0.0.0.0:9000 4.16 kB {1} [built]
  [84] ./node_modules/phaser/build/custom/pixi.js-exposed 57 bytes {1} [built]
  [85] ./node_modules/phaser/build/custom/p2.js-exposed 53 bytes {1} [built]
  [86] ./node_modules/phaser/build/custom/phaser-split.js-exposed 67 bytes {1} [built]
 [125] multi (webpack)-dev-server/client?http://0.0.0.0:9000 ./src/index.ts 40 bytes {0} [built]
 [132] ./node_modules/strip-ansi/index.js 161 bytes {1} [built]
 [134] (webpack)-dev-server/client/socket.js 897 bytes {1} [built]
 [166] ./src/index.ts 8 kB {0} [built]
 [167] ./node_modules/phaser/build/custom/pixi.js 242 kB {1} [built]
 [168] ./node_modules/phaser/build/custom/p2.js 396 kB {1} [built]
 [169] ./node_modules/phaser/build/custom/phaser-split.js 2.53 MB {1} [built]
 [170] ./src/config.ts 132 bytes {0} [built]
 [271] multi (webpack)-dev-server/client?http://0.0.0.0:9000 pixi p2 phaser webfontloader 76 bytes {1} [built]
 [272] ./node_modules/webfontloader/webfontloader.js 12.5 kB {1} [built]
    + 258 hidden modules

ERROR in /Users/XXXX/Projects/tiles-chain/webclient/node_modules/loom-js/dist/crypto-utils.d.ts
(37,54): error TS2304: Cannot find name 'Buffer'.

ERROR in /Users/XXXX/Projects/tiles-chain/webclient/node_modules/loom-js/dist/crypto-utils.d.ts
(1,23): error TS2688: Cannot find type definition file for 'node'.
Child html-webpack-plugin for "index.html":
     1 asset
       [0] ./node_modules/html-webpack-plugin/lib/loader.js!./index.html 574 bytes {0} [built]
       [1] ./node_modules/lodash/lodash.js 540 kB {0} [built]
       [2] (webpack)/buildin/global.js 509 bytes {0} [built]
       [3] (webpack)/buildin/module.js 517 bytes {0} [built]
Hash: 0c4be3bc02cd3a75a50c
Version: webpack 3.11.0
Time: 1220ms
 2 assets
 [166] ./src/index.ts 8 kB {0} [built]
 [170] ./src/config.ts 132 bytes {0} [built]
 [171] ./src/contract_client.ts 5.39 kB {0} [built]
 [269] ./src/proto/dots_pb.js 8.68 kB {0} [built]
 [270] ./src/events.ts 1.18 kB {0} [built]
    + 268 hidden modules

ERROR in /Users/XXXX/Projects/tiles-chain/webclient/node_modules/loom-js/dist/crypto-utils.d.ts
(37,54): error TS2304: Cannot find name 'Buffer'.

ERROR in /Users/XXXX/Projects/tiles-chain/webclient/node_modules/loom-js/dist/crypto-utils.d.ts
(1,23): error TS2688: Cannot find type definition file for 'node'.
Child html-webpack-plugin for "index.html":
     1 asset
       4 modules
eduardonunesp commented 6 years ago

@alexjfno1 Looks there's some disparity with the version of typescript, could please try the version of typescript 2.8.3 yarn add typescript@2.8.3

alexjfno1 commented 6 years ago

All working now! 🚀