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

xstate-wallet From NPM Does Not Compile and Run #3

Open
HyperCharlie opened this issue Oct 1, 2020 · 0 comments
Open

xstate-wallet From NPM Does Not Compile and Run #3

HyperCharlie opened this issue Oct 1, 2020 · 0 comments

Comments

@HyperCharlie
Copy link

After following @geoknee's new advanced development instructions and installing xstate-wallet from NPM (along with Devtools), I run the start script in the module and Ganache starts and loads properly, but the actual wallet code does not properly compile. The build logs in the terminal only indicate the first error below, but when I load the wallet at localhost:3055, I see all of the below errors:

index.js:1406 undefined
TypeScript error in undefined(undefined,undefined):
Cannot find type definition file for 'react'.  TS2688
console.<computed> @ index.js:1406
handleErrors @ webpackHotDevClient.js:151
push.../../react-dev-utils/webpackHotDevClient.js.connection.onmessage @ webpackHotDevClient.js:194
push.../../sockjs-client/lib/event/eventtarget.js.EventTarget.dispatchEvent @ eventtarget.js:56
(anonymous) @ main.js:283
push.../../sockjs-client/lib/main.js.SockJS._transportMessage @ main.js:281
push.../../sockjs-client/lib/event/emitter.js.EventEmitter.emit @ emitter.js:53
WebSocketTransport.ws.onmessage @ websocket.js:36
index.js:1406 undefined
TypeScript error in undefined(undefined,undefined):
Cannot find type definition file for 'segment-analytics'.  TS2688
console.<computed> @ index.js:1406
handleErrors @ webpackHotDevClient.js:151
push.../../react-dev-utils/webpackHotDevClient.js.connection.onmessage @ webpackHotDevClient.js:194
push.../../sockjs-client/lib/event/eventtarget.js.EventTarget.dispatchEvent @ eventtarget.js:56
(anonymous) @ main.js:283
push.../../sockjs-client/lib/main.js.SockJS._transportMessage @ main.js:281
push.../../sockjs-client/lib/event/emitter.js.EventEmitter.emit @ emitter.js:53
WebSocketTransport.ws.onmessage @ websocket.js:36
index.js:1406 undefined
TypeScript error in undefined(undefined,undefined):
Cannot read file '/home/csibbach/source/hypernet-protocol/protocol/node_modules/tsconfig.json'.  TS5083
console.<computed> @ index.js:1406
handleErrors @ webpackHotDevClient.js:151
push.../../react-dev-utils/webpackHotDevClient.js.connection.onmessage @ webpackHotDevClient.js:194
push.../../sockjs-client/lib/event/eventtarget.js.EventTarget.dispatchEvent @ eventtarget.js:56
(anonymous) @ main.js:283
push.../../sockjs-client/lib/main.js.SockJS._transportMessage @ main.js:281
push.../../sockjs-client/lib/event/emitter.js.EventEmitter.emit @ emitter.js:53
WebSocketTransport.ws.onmessage @ websocket.js:36
index.js:1406 /home/csibbach/source/hypernet-protocol/protocol/node_modules/@statechannels/xstate-wallet/tsconfig.json
TypeScript error in /home/csibbach/source/hypernet-protocol/protocol/node_modules/@statechannels/xstate-wallet/tsconfig.json(27,5):
File '/home/csibbach/source/hypernet-protocol/protocol/node_modules/@statechannels/nitro-protocol' not found.  TS6053    25 |   "include": ["./src"],
    26 |   "references": [
  > 27 |     {
       |     ^
    28 |       "path": "../nitro-protocol"
    29 |     },
    30 |     {
console.<computed> @ index.js:1406
handleErrors @ webpackHotDevClient.js:151
push.../../react-dev-utils/webpackHotDevClient.js.connection.onmessage @ webpackHotDevClient.js:194
push.../../sockjs-client/lib/event/eventtarget.js.EventTarget.dispatchEvent @ eventtarget.js:56
(anonymous) @ main.js:283
push.../../sockjs-client/lib/main.js.SockJS._transportMessage @ main.js:281
push.../../sockjs-client/lib/event/emitter.js.EventEmitter.emit @ emitter.js:53
WebSocketTransport.ws.onmessage @ websocket.js:36
index.js:1406 /home/csibbach/source/hypernet-protocol/protocol/node_modules/@statechannels/xstate-wallet/tsconfig.json
TypeScript error in /home/csibbach/source/hypernet-protocol/protocol/node_modules/@statechannels/xstate-wallet/tsconfig.json(30,5):
Referenced project '/home/csibbach/source/hypernet-protocol/protocol/node_modules/@statechannels/devtools' must have setting "composite": true.  TS6306    28 |       "path": "../nitro-protocol"
    29 |     },
  > 30 |     {
       |     ^
    31 |       "path": "../devtools"
    32 |     },
    33 |     {
console.<computed> @ index.js:1406
handleErrors @ webpackHotDevClient.js:151
push.../../react-dev-utils/webpackHotDevClient.js.connection.onmessage @ webpackHotDevClient.js:194
push.../../sockjs-client/lib/event/eventtarget.js.EventTarget.dispatchEvent @ eventtarget.js:56
(anonymous) @ main.js:283
push.../../sockjs-client/lib/main.js.SockJS._transportMessage @ main.js:281
push.../../sockjs-client/lib/event/emitter.js.EventEmitter.emit @ emitter.js:53
WebSocketTransport.ws.onmessage @ websocket.js:36
index.js:1406 /home/csibbach/source/hypernet-protocol/protocol/node_modules/@statechannels/xstate-wallet/tsconfig.json
TypeScript error in /home/csibbach/source/hypernet-protocol/protocol/node_modules/@statechannels/xstate-wallet/tsconfig.json(33,5):
File '/home/csibbach/source/hypernet-protocol/protocol/node_modules/@statechannels/client-api-schema' not found.  TS6053    31 |       "path": "../devtools"
    32 |     },
  > 33 |     {
       |     ^
    34 |       "path": "../client-api-schema"
    35 |     },
    36 |     {
console.<computed> @ index.js:1406
handleErrors @ webpackHotDevClient.js:151
push.../../react-dev-utils/webpackHotDevClient.js.connection.onmessage @ webpackHotDevClient.js:194
push.../../sockjs-client/lib/event/eventtarget.js.EventTarget.dispatchEvent @ eventtarget.js:56
(anonymous) @ main.js:283
push.../../sockjs-client/lib/main.js.SockJS._transportMessage @ main.js:281
push.../../sockjs-client/lib/event/emitter.js.EventEmitter.emit @ emitter.js:53
WebSocketTransport.ws.onmessage @ websocket.js:36
index.js:1406 /home/csibbach/source/hypernet-protocol/protocol/node_modules/@statechannels/xstate-wallet/tsconfig.json
TypeScript error in /home/csibbach/source/hypernet-protocol/protocol/node_modules/@statechannels/xstate-wallet/tsconfig.json(36,5):
File '/home/csibbach/source/hypernet-protocol/protocol/node_modules/@statechannels/wallet-core' not found.  TS6053    34 |       "path": "../client-api-schema"
    35 |     },
  > 36 |     {
       |     ^
    37 |       "path": "../wallet-core"
    38 |     }
    39 |   ]

To Reproduce

  1. Install xstate-wallet and devtools from NPM.
  2. run the start script in you own code. From our package.json, ours is this:
"start-xstate-wallet": "env-cmd -f ./.env.development --use-shell \"yarn start-wallet-and-ganache\"",
    "start-wallet-and-ganache": "concurrently \"yarn start-shared-ganache\" \"wait-on tcp:8545 && yarn start-web-wallet\"",
    "start-shared-ganache": "yarn --cwd ../../node_modules/@statechannels/devtools/ start:shared-ganache",
    "start-web-wallet": "yarn --cwd ../../node_modules/@statechannels/xstate-wallet/ start",

Expected behavior
I should be able to start xstate-wallet locally and have it work via mountWalletComponent().

Environment
Ubuntu 20.04 via Windows WSL

@andrewgordstewart andrewgordstewart transferred this issue from statechannels/statechannels Jan 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant