scratchfoundation / scratch-gui

Graphical User Interface for creating and running Scratch 3.0 projects.
https://scratchfoundation.github.io/scratch-gui/develop/
BSD 3-Clause "New" or "Revised" License
4.41k stars 3.5k forks source link

how to generator python code? #8994

Open cuigc2010 opened 1 year ago

cuigc2010 commented 1 year ago
  1. i got 'python_compressed.js', from blockly and scratch-blocks(old version)
  2. link scratch-blocks, then run scratch-gui, bug error
    python_compressed.js:5 Uncaught TypeError: Blockly.Generator is not a constructor
    at ./node_modules/scratch-blocks/python_compressed.js (python_compressed.js:5:1)

what can i do , scratch-gui can run generator python code ok ???

rickbot-dot commented 1 year ago

You may have forgot to install npm dependencies. Blockly is available from the npm repository. Run npm install in the root of the scratch-blocks clone.

If you forked scratch-blocks and don't have a clone, you can create a GitHub codespace and run npm install in it.