scratchfoundation / scratch-blocks

Scratch Blocks is a library for building creative computing interfaces.
https://scratch.mit.edu/developers
Apache License 2.0
2.58k stars 1.37k forks source link

npm install issue #3201

Open gurumoorty-s opened 6 months ago

gurumoorty-s commented 6 months ago

Expected Behavior

Should give no errors.

Actual Behavior

scratch-blocks@1.1.57 prepublish python build.py && webpack

D:\Scratch Mod\scratch-blocks\build.py:106: SyntaxWarning: invalid escape sequence '\/' f.write(self.format_js(""" D:\Scratch Mod\scratch-blocks\build.py:440: SyntaxWarning: invalid escape sequence '\w' LICENSE = re.compile("""/\* Could not find "java" in your PATH. Using remote compiler: closure-compiler.appspot.com ...

Error: Closure not found. Read this: developers.google.com/blockly/guides/modify/web/closure npm ERR! code 1 npm ERR! path D:\Scratch Mod\scratch-blocks npm ERR! command failed npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c python build.py && webpack

npm ERR! A complete log of this run can be found in: C:\Users\ABHINAND\AppData\Local\npm-cache_logs\2024-03-21T13_44_32_165Z-debug-0.log

Steps to Reproduce

Explain what someone needs to do in order to see what's described in Actual behavior above

Steps to reproduce the behavior:

  1. Make a folder and in that folder, open cmd.
  2. Do git clone https://github.com/scratchfoundation/scratch-blocks.git
  3. Follow the step as mentioned in #2364
  4. Do npm install

System Details

Windows 10, Java 8, JDK 22, Python 3.12

So I am new to development with scratch. I wanted to add block based programming functionality to Scratch 3.0 wherein we can Program in Python from basic blocks. I also want to have ESP32 connectivity with that. After some research, I cloned scratch-gui and scratch-vm but then while cloning and getting scratch-blocks ready, I am facing these errors. Also I am a beginner to this, so it would be nice if someone would be able to guide me through the process of modding scratch. Another thing is that Closure is officially shutting down soon so how to avoid errors regarding that. If someone can contribute, please do so.

Thanks.

CST1229 commented 6 months ago

Read the error message. You have to install Java (yes, not JavaScript here. Compiling scratch-blocks requires installing Java).

gurumoorty-s commented 6 months ago

Read the error message. You have to install Java (yes, not JavaScript here. Compiling scratch-blocks requires installing Java).

Thanks for the reply. But if you see the system specifications, I have already i stalled Java 8(Also added to PATH) and also installed JDK 22(Added to PATH as well). But the error still persists.