Try out the first prototype of our new scaffolding tool!

More in the Mission Creek area… I wasn’t planning on heading into town :slight_smile: Although to come see you on the other side of the lake would mean that journey, or take a boat. Take care

1 Like

A boat would be nice :slight_smile: lovely landscape between Mission and my side of the lake.

@mikeg Question: looks like there was a bug that is fixed with holochain v0.0.46 / holonix v0.0.72 . I know you said you were already using those versions, but would you be willing to test again from scratch? (The hApp template itself is not included in holonix, so it might have some fixes that’ll get pulled down.) I’m able to write, read, edit, and delete notes on my setup.

Rebuilt and it is working, with cavaets. More observations (should probably take this offline):

  • as mentioned, the first build takes a long time. Stopping and starting again as yarn start is much quicker, but still 10-15 seconds
  • entering the first note is displayed after entered with “Edit” and “Remove” buttons. These work.
  • adding a second note doesn’t, however refreshing the browser window shows it is there. This happens for subsequent notes
  • Editing an existing note shows the change without manual refresh.
1 Like

No need to take this offline; this sort of feedback is exactly what I want this thread to be for. Thanks for the issue report! I’ll have to check my copy to see if I can reproduce the issue – haven’t observed it before. Does the second note never show up even if you wait for a while?

If this is built in React, it is just not doing an additional render() on first creation of the first entry. The second entry seems to be ok.

Thanks for the protip. Sounds like we’re going to be moving away from React towards LitElement from Polymer (thanks @guillemcordoba for the influence), so we’ll likely need to make sure that we get this right in the second iteration – although we should fix it in the first iteration too.

2 Likes

im getting
hn-happ-create: command not found
on the newest(?) version of holochain.love
$ hc --version
hc 0.0.47-alpha1

I’m very new to this so not sure if I’m doing something wrong or if the hn-happ-create command is actually still not in the blessed release.

try hc-happ-create

It worked!

Thanks @pegaltier! Yes the scaffolding tool command is now `hc-happ-create.

3 Likes

Loving this tool. It really changed my perspective on how to structure my project and how to use it effectively with GraphQL! Huge props!

I have a question though. I’m having trouble running two different agents on the same network with this template. I’ve tried creating another process on the Procfile file but it’s the same agent. How can I use this template with two different agents in the same network (have, for example, Alice on port 5200 and Bob on port 5201 and send a message from one to another)

I’ve tried changing the .toml file as well but to no avail :frowning:

Hi, @LuchoTurtle . I’ve looked through the codebase, and it’s fiddly enough that you’ll probably have an annoying time trying to get it to work. I think it would be good for us to create a simple way to start an extra agent — do you think that just a Bob agent would be sufficient to demo the network communications?

Here’s an ugly-ish way of getting it going. This assumes that you’ve already started one instance (which is the Alice instance).

  1. In the project’s root, type
    $ holochain -c 2-conductor-config.toml
    
    This is the Bob instance; 2-conductor-config.toml would’ve been auto-generated for you on first run.
  2. Open up a new terminal, enter the nix-shell, go to the project root, and type
    $ cd ui_src
    $ cp .env .env.bob
    $ vim .env.bob
    
  3. Edit the new env file so that the DNA interface URL’s port number is 33001 rather than 33000, and add this line:
    PORT=3001
    
  4. Install a Node package that’ll let you send this new env file to the React dev server:
    $ npm install --save-dev env-cmd
    
  5. Run a second instance of the React dev server for Bob, which will connect to your Bob DNA instance and serve up the UI on a different port:
    $ node_modules/bin/env-cmd -f ./.env.bob yarn start
    
    (if you get any compilation errors, I found that a quick npm install solved that problem.)

This is a lot harder than it should be, and after all that, Alice and Bob can’t seem to see each other’s notes. I’ve just asked the hAppy team if they should be able to. I’ll get back to you!

2 Likes

Hey there @pauldaoust! Thank you so, so much for the answer, it helped me tremendously!

I’ve followed the steps accordingly and it went smoothly and everything seems to be working! Even the direct messaging!

Can’t thank you enough. It helped me understand better how things worked, as well! I’ve incorporated these steps into their own Procfile. I could make a pull request, if you want to! It’s essentially following your steps but yeah. I’ll leave it up to ya!

1 Like

@pauldaoust or anyone that might know this. Thank you so much for the reply but I have (most likely the last one) a question regarding the template. I noticed that the conductor that is being run is the holochain conductor and, therefore, the production conductor.

I’ve noticed that the 1-conductor- config.toml file is changed after I run the agent (run yarn start). I’m fine with it but, for my project, I want to disable the admin flag. But every time I do it, the file reverts this flag to true after I run the yarn start command.

I’ve researched the docs and apparently this is a behavior (changing the properties of the config.toml file) that is optional when you use the production conductor. That led me to this. However I’ve yet to find instances of these being used in the template.

Is there something I’m missing? How can I permanently set the admin flag to false?

Thank you :slight_smile:

Hello everyone,

First, I would like to also thank the team for this sample project that we could use to make sure the basics are set up okay and to learn too.

So I just finished going through all the steps. It only seem to be crashing at the last step. When I enter the command ‘yearn start’ it loads and then show a red message: Existed with exit code SIGINT.

This error is on the last line of Holochain.1
After this I keep getting react.1 lines with the message: waiting for Holochain to configure and boot.

Anyone knows how to fix this? Any help is greatly appreciated.

Thanks,

I found the solution:
I went into the dna folder of the my notes happ where the default.nix file is, and run:
nix-shell .

Hi, this little workaround has also worked for me. What I still don’t know is… Why?

running nix-shell is not a little hack.
Is uses the nix packager manager to install all the needed libraries and binaries to run the holochain conductor.

Try running:
holochain --version

before you enter ‘nix-shell’ and again after

The RAD tool is amazing. I manage to create a project. however when submitted notes it seems to get stuck to GraphQL Error. The note is never submitted like in the video and an error page shows off. I do that in Ubuntu 20.04. Also I have a brand new macbook pro Big Sure. It does not even work at all on it. the hc-app-create command and the entire holochain technology do not work on Big Sure. What’s your thought on that?