Run examples inside blockly sample plugin

48 views
Skip to first unread message

Aparna Gk

unread,
Nov 17, 2021, 6:59:41 AM11/17/21
to Blockly
Hi Everyone,

I was trying to run the index.html file locally I'm getting error attached in the screen shot
Error.JPG
Could anyone please assist me with the steps that is needed to run the same

Code : Code.JPG

Thanks in advance.

Beka Westberg

unread,
Nov 17, 2021, 10:41:18 AM11/17/21
to blo...@googlegroups.com
Hello =)

Because of how the code is compiled you need to run an http server to get your browser to open it. You should be able to do this by running `npm run start` in a terminal, in the directory with the page you want to open.

I hope that helps!
--Beka

--
You received this message because you are subscribed to the Google Groups "Blockly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/blockly/7b26b392-cf88-4800-bdeb-f0943b403201n%40googlegroups.com.

Aparna Gk

unread,
Nov 18, 2021, 1:06:53 AM11/18/21
to Blockly
Hello:)
When I try to the open through npm run start i get the below errorSiteError.JPG

Beka Westberg

unread,
Nov 18, 2021, 10:48:32 AM11/18/21
to blo...@googlegroups.com
Hm hm hm, that's odd. Are you by any chance trying to run this on windows? I think there may be some incompatibilities there (tracking issue).

I vaguely remember a different forum post which had a similar issue. Could you try typing 0.0.0.0:3000/test and localhost:3000/test into your browser manually? I think one of those may have been the fix for the other person.

Sorry I don't have any more recommendations at the moment :/ but if I think of something I'll definitely post!

Best wishes,
--Beka

Aparna Gk

unread,
Nov 19, 2021, 6:01:17 AM11/19/21
to Blockly
Typing  localhost:3000/test worked:)
Many Thanks!

Beka Westberg

unread,
Nov 19, 2021, 10:17:49 AM11/19/21
to blo...@googlegroups.com
Yay I'm glad you found something that works for you! Best of luck with your project!

Reply all
Reply to author
Forward
0 new messages