holochain / syn

Generalized Holochain DNA and UI library for building real-time shared state hApps
Other
91 stars 11 forks source link

Can't start UI #27

Open feldim2425 opened 3 years ago

feldim2425 commented 3 years ago

Following the README leads to a npm error before the UI can start.

> @syn/dev@0.0.0 start /home/feldi/Downloads/syn
> cross-env HC_PORT=$(port) concurrently -k "npm run dev:libs" "npm run start:happ" "npm run dev -w syntext"

[1] 
[1] > @syn/dev@0.0.0 start:happ /home/feldi/Downloads/syn
[1] > npm run build:happ && hc s generate -r=$HC_PORT dna/workdir/happ/syn.happ -a syn network --bootstrap https://bootstrap-staging.holo.host/ quic
[1] 
[0] 
[0] > @syn/dev@0.0.0 dev:libs /home/feldi/Downloads/syn
[0] > concurrently -k "npm run build:watch -w @syn/zome-client" "npm run build:watch -w @syn/store" "npm run build:watch -w @syn/elements"
[0] 
[2] npm ERR! missing script: dev
[2] 
[2] npm ERR! A complete log of this run can be found in:
[2] npm ERR!     /home/feldi/.npm/_logs/2021-09-08T09_55_09_009Z-debug.log
[2] npm run dev -w syntext exited with code 1
--> Sending SIGTERM to other processes..
[0] npm run dev:libs exited with code SIGTERM
--> Sending SIGTERM to other processes..
[1] npm run start:happ exited with code SIGTERM
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @syn/dev@0.0.0 start: `cross-env HC_PORT=$(port) concurrently -k "npm run dev:libs" "npm run start:happ" "npm run dev -w syntext"`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @syn/dev@0.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

I'm using nix-shell 2.3.15. For installation I followed the holochain developer guide: https://developer.holochain.org/install/

guillemcordoba commented 3 years ago

Hi @feldim2425 :)

Are you running this in the nix-shell provided by this repo?

You can access it by running nix-shell . inside the root folder of this repo.

feldim2425 commented 3 years ago

I have rebuilt the environment / started another nix-shell with nix-shell . But it still fails with a similar error:

[nix-shell:~/Downloads/syn]$ npm start

> @syn/dev@0.0.0 start
> cross-env HC_PORT=$(port) concurrently -k "npm run dev:libs" "npm run start:happ" "npm run dev -w syntext"

[1] 
[1] > @syn/dev@0.0.0 start:happ
[1] > npm run build:happ && hc s generate -r=$HC_PORT dna/workdir/happ/syn.happ -a syn network --bootstrap https://bootstrap-staging.holo.host/ quic
[1] 
[0] 
[0] > @syn/dev@0.0.0 dev:libs
[0] > concurrently -k "npm run build:watch -w @syn/zome-client" "npm run build:watch -w @syn/store" "npm run build:watch -w @syn/elements"
[0] 
[2] 
[2] > syntext@0.0.1 dev
[2] > rollup -c -w
[2] 
[2] sh: rollup: command not found
[2] npm ERR! Lifecycle script `dev` failed with error: 
npm ERR! Error: command failed 
[2] npm ERR!   in workspace: syntext@0.0.1 
[2] npm ERR!   at location: /home/feldi/Downloads/syn/ui/apps/syntext 
[2] npm run dev -w syntext exited with code 1
--> Sending SIGTERM to other processes..
[0] npm run dev:libs exited with code SIGTERM
--> Sending SIGTERM to other processes..
[1] npm run start:happ exited with code SIGTERM
feldim2425 commented 3 years ago

Ok my bad. I mixed up npm start and npm run start

However it still just opens as a white-screen in the browser with the Javascript error:

Uncaught ReferenceError: elements is not defined
    <anonymous> http://localhost:5000/build/bundle.js:14413
bundle.js:14413:1
    <anonymous> http://localhost:5000/build/bundle.js:14413

However this might be a separate issue.