Webapp quick start tutorial,Cannot read property 'initialise' of undefined

i really code like what the tutorial wrote, but it doesn’t work, why?will somebody help me?

Hi,
Glad to hear that you are getting started.

One of our community had what looks like a similar problem with connecting to the localhost, see the discussion here:

Could not connect to SAFE Network - #7 by JackTiew

If you are still struggling after having a look at that then let us know in this topic and we’ll see if we can help more.
…and if you could post some more code to give context it would make things a little easier for us to see what’s going wrong.

Thanks,
David.

1 Like

Could you also show the code or the exact tutorial you used?

In the meantime, this is very likely due to not loading the web app using a protocol where the Web API is exposed, i.e. only from a safe:// and localhost protocols the Web API is exposed. So it’s likely to be the issue @DGeddes pointed out about the way localhost is supported by our Beaker browser (localhost://p:<port>) vs. our Peruse browser (http://localhost:<port>).

1 Like

I still can’t figure it out, so the code image below, please help me check it. Thank you very much!

it is the code that i just copied from the tutorial, there should be no problem there. I think maybe it is lay in the “npm install” when i created the skeleton. some warns appeared:

npm WARN safe_web_app_quick_start@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

my pc is win64, i am sure about this!

Hi @Daxang_Xiang, can you please confirm which browser you are using (beaker or Peruse?), which version, and how you are loading the app on the browser?

hi bochaco, i am sorry, i am using the Beaker, now i load the app with “localhost://p:5000/”, the "initialise"problem sees solved,but some others appear:

browser version is safe-browser-mock-v0.10.2-win-x64.

great! now, are you setting the NODE_ENV=dev environment variable in the console where you are launching the browser? it seems you are not

1 Like

oh, great thanks , dear bochaco! problem solved, it is my mistake, i ignored all the points in the tutorial…
really really thank you!

by the way , is this forum run on safenetwork? it is awesome!

2 Likes

nice! excellent, please share any other problems you have in the forum, it’s very helpful to understand what issue/s people run into.

The forum is not running on the network, but there is a project called Decorum trying to create a decentralised forum if you are interested in looking at. There are several other threads in that forum you may also want to check.

2 Likes

ok, sure! i love the idea of Decorum, and i really want to build a info-platform in China

3 Likes

Achievement unlocked : Software Pro :wink:

4 Likes

hahahahaha! I learnde a lot!:grinning::grin:

2 Likes

@Daxang_Xiang- glad to hear you are up and running now - I’ll close this off now.
@happybeing - too funny…

David.

1 Like