Scratch-blocks: Fix documentation for "Error: Closure not found"

Created on 17 May 2016  路  8Comments  路  Source: LLK/scratch-blocks

After installing the way the wiki explained, and opening tests/horizontal_playground.html, I got an alert saying:

Error: Closure not found.  Read this:
developers.google.com/blockly/hacking/closure

It looks like you need to have closure-library installed in the lower directory.

calcdeps = import_path(os.path.join(
  os.path.pardir, "closure-library", "closure", "bin", "calcdeps.py"))

That, honestly, feels like bad design (i.e. I keep _my_ GitHub projects in one directory and other random clones in another, so I don't really want closure-library, which I don't contribute to, in my I-contribute directory).

After getting closure-library installed at scratch-blocks/.., running build.py again, and opening the example/test file again, it worked.

bug ergonomics

Most helpful comment

Assuming you've used a terminal before..

cd <where you put your github prjoects>
git clone https://github.com/google/closure-library.git
git clone https://github.com/LLK/scratch-blocks.git
cd scratch-blocks
python build.py
# Now you can experiment by opening up
# tests/horizontal_playground.html :)

Of course, you'll need git and python installed.

All 8 comments

Thanks for bringing this up. A wiki update seems in order for now. Eventually we'd like to fix this up so you don't need Closure in the parent directory, as you say. That may take some effort, though :)

I'm still trying to figure out how to actually get build.py running in the first place - any help appreciated...

$ npm i
$ cd ../ && npm i closure-library && cd scratch-blocks
$ python build.py
Error: Closure not found.  Read this:
https://developers.google.com/blockly/hacking/closure

Replace npm i closure-library with git clone https://github.com/google/closure-library.git.

What is the current work around to try out Scratch Blocks please (in simple step langauge)

Assuming you've used a terminal before..

cd <where you put your github prjoects>
git clone https://github.com/google/closure-library.git
git clone https://github.com/LLK/scratch-blocks.git
cd scratch-blocks
python build.py
# Now you can experiment by opening up
# tests/horizontal_playground.html :)

Of course, you'll need git and python installed.

No need to build the absolute latest version though, the compressed/uncompressed blockly in the repository is new enough to give it a quick test.

@liam4 That got rid of error and I can now see the blocks - Ta :)

Documentation in the Wiki has been updated:
https://github.com/LLK/scratch-blocks/wiki

Was this page helpful?
0 / 5 - 0 ratings

Related issues

towerofnix picture towerofnix  路  4Comments

thisandagain picture thisandagain  路  6Comments

towerofnix picture towerofnix  路  6Comments

thisandagain picture thisandagain  路  5Comments

rachel-fenichel picture rachel-fenichel  路  4Comments