Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm install process of scratch-blocks don't work #3328

Open
Robotikaforkids opened this issue Nov 15, 2024 · 1 comment
Open

npm install process of scratch-blocks don't work #3328

Robotikaforkids opened this issue Nov 15, 2024 · 1 comment

Comments

@Robotikaforkids
Copy link

Expected Behavior
Should give no errors.

Actual Behavior

[email protected] prepublish
python build.py && webpack

C:\scratch-blocks\build.py:106: SyntaxWarning: invalid escape sequence '/'
f.write(self.format_js("""
C:\scratch-blocks\build.py:440: SyntaxWarning: invalid escape sequence '\w'
LICENSE = re.compile("""/\*
C:\scratch-blocks\node_modules\google-closure-library\closure\bin\calcdeps.py:46: SyntaxWarning: invalid escape sequence '\s'
_BASE_REGEX_STRING = '^\sgoog.%s(\s'"['"]\s*)'
C:\scratch-blocks\node_modules\google-closure-library\closure\bin\calcdeps.py:49: SyntaxWarning: invalid escape sequence '\w'
ns_regex = re.compile('^ns:((\w+.)*(\w+))$')
C:\scratch-blocks\node_modules\google-closure-library\closure\bin\calcdeps.py:50: SyntaxWarning: invalid escape sequence '.'
version_regex = re.compile('[.0-9]+')
Using local compiler: google-closure-compiler.cmd ...

Exception in thread Thread-4:
Traceback (most recent call last):
File "C:\Python312\Lib\threading.py", line 1073, in _bootstrap_inner
La línea de comandos es demasiado larga.
self.run()
File "C:\scratch-blocks\build.py", line 232, in run
self.gen_core(True)
File "C:\scratch-blocks\build.py", line 268, in gen_core
self.do_compile(params, target_filename, filenames, "")
File "C:\scratch-blocks\build.py", line 310, in do_compile
json_data = do_compile(params, target_filename)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\scratch-blocks\build.py", line 337, in do_compile_local
(stdout, stderr) = proc.communicate()
^^^^^^^^^^^^^^^^^^
File "C:\Python312\Lib\subprocess.py", line 1209, in communicate
stdout, stderr = self._communicate(input, endtime, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python312\Lib\subprocess.py", line 1610, in _communicate
self.stdout_thread.start()
File "C:\Python312\Lib\threading.py", line 992, in start
_start_new_thread(self._bootstrap, ())
RuntimeError: can't create new thread at interpreter shutdown
SUCCESS: blockly_uncompressed_vertical.js
SUCCESS: blockly_uncompressed_horizontal.js
Hash: e52c1019d53c282c1e0d81e9e8f8c1ffe60f3acff2c3aecb57eb06551de2
Version: webpack 4.47.0
Child
Hash: e52c1019d53c282c1e0d
Time: 2560ms
Built at: 15/11/2024 10:11:08
Asset Size Chunks Chunk Names
horizontal.js 1.21 MiB horizontal [emitted] [big] horizontal
vertical.js 1.21 MiB vertical [emitted] [big] vertical
Entrypoint horizontal [big] = horizontal.js
Entrypoint vertical [big] = vertical.js
[./node_modules/imports-loader/index.js?Blockly=../shim/blocks_compressed_horizontal,goog=../shim/blockly_compressed_horizontal.goog!./node_modules/exports-loader/index.js?Blockly!./msg/messages.js] ./node_modules/imports-loader?Blockly=../shim/blocks_compressed_horizontal,goog=../shim/blockly_compressed_horizontal.goog!./node_modules/exports-loader?Blockly!./msg/messages.js 15.7 KiB {horizontal} [built]
[./node_modules/imports-loader/index.js?Blockly=../shim/blocks_compressed_horizontal-blockly_compressed_horizontal-messages,goog=../shim/blockly_compressed_horizontal.goog!./node_modules/exports-loader/index.js?Blockly!./msg/scratch_msgs.js] ./node_modules/imports-loader?Blockly=../shim/blocks_compressed_horizontal-blockly_compressed_horizontal-messages,goog=../shim/blockly_compressed_horizontal.goog!./node_modules/exports-loader?Blockly!./msg/scratch_msgs.js 1.08 MiB {horizontal} [built]
[./node_modules/imports-loader/index.js?Blockly=../shim/blocks_compressed_vertical,goog=../shim/blockly_compressed_vertical.goog!./node_modules/exports-loader/index.js?Blockly!./msg/messages.js] ./node_modules/imports-loader?Blockly=../shim/blocks_compressed_vertical,goog=../shim/blockly_compressed_vertical.goog!./node_modules/exports-loader?Blockly!./msg/messages.js 15.7 KiB {vertical} [built]
[./node_modules/imports-loader/index.js?Blockly=../shim/blocks_compressed_vertical-blockly_compressed_vertical-messages,goog=../shim/blockly_compressed_vertical.goog!./node_modules/exports-loader/index.js?Blockly!./msg/scratch_msgs.js] ./node_modules/imports-loader?Blockly=../shim/blocks_compressed_vertical-blockly_compressed_vertical-messages,goog=../shim/blockly_compressed_vertical.goog!./node_modules/exports-loader?Blockly!./msg/scratch_msgs.js 1.08 MiB {vertical} [built]
[./shim/blockly_compressed_horizontal.goog.js] 66 bytes {horizontal} [built]
[./shim/blockly_compressed_horizontal.js] 118 bytes {horizontal} [built]
[./shim/blockly_compressed_vertical.goog.js] 64 bytes {vertical} [built]
[./shim/blockly_compressed_vertical.js] 116 bytes {vertical} [built]
[./shim/blocks_compressed_horizontal-blockly_compressed_horizontal-messages.js] 176 bytes {horizontal} [built]
[./shim/blocks_compressed_horizontal.js] 162 bytes {horizontal} [built]
[./shim/blocks_compressed_vertical-blockly_compressed_vertical-messages.js] 172 bytes {vertical} [built]
[./shim/blocks_compressed_vertical.js] 203 bytes {vertical} [built]
[./shim/horizontal.js] 219 bytes {horizontal} [built]
[./shim/vertical.js] 213 bytes {vertical} [built]

ERROR in ./shim/blockly_compressed_horizontal.js
Module not found: Error: Can't resolve '../blockly_compressed_horizontal' in 'C:\scratch-blocks\shim'
 @ ./shim/blockly_compressed_horizontal.js 1:17-116
 @ ./shim/blockly_compressed_horizontal.goog.js
 @ ./node_modules/imports-loader?Blockly=../shim/blocks_compressed_horizontal-blockly_compressed_horizontal-messages,goog=../shim/blockly_compressed_horizontal.goog!./node_modules/exports-loader?Blockly!./msg/scratch_msgs.js
 @ ./shim/horizontal.js

ERROR in ./shim/blockly_compressed_vertical.js
Module not found: Error: Can't resolve '../blockly_compressed_vertical' in 'C:\scratch-blocks\shim'
 @ ./shim/blockly_compressed_vertical.js 1:17-114
 @ ./shim/blockly_compressed_vertical.goog.js
 @ ./node_modules/imports-loader?Blockly=../shim/blocks_compressed_vertical-blockly_compressed_vertical-messages,goog=../shim/blockly_compressed_vertical.goog!./node_modules/exports-loader?Blockly!./msg/scratch_msgs.js
 @ ./shim/vertical.js

ERROR in ./shim/blocks_compressed_horizontal.js
Module not found: Error: Can't resolve '../blocks_compressed_horizontal' in 'C:\scratch-blocks\shim'
 @ ./shim/blocks_compressed_horizontal.js 1:17-160
 @ ./node_modules/imports-loader?Blockly=../shim/blocks_compressed_horizontal,goog=../shim/blockly_compressed_horizontal.goog!./node_modules/exports-loader?Blockly!./msg/messages.js
 @ ./shim/blocks_compressed_horizontal-blockly_compressed_horizontal-messages.js
 @ ./node_modules/imports-loader?Blockly=../shim/blocks_compressed_horizontal-blockly_compressed_horizontal-messages,goog=../shim/blockly_compressed_horizontal.goog!./node_modules/exports-loader?Blockly!./msg/scratch_msgs.js
 @ ./shim/horizontal.js

ERROR in ./shim/blocks_compressed_vertical.js
Module not found: Error: Can't resolve '../blocks_compressed_vertical' in 'C:\scratch-blocks\shim'
 @ ./shim/blocks_compressed_vertical.js 1:17-201
 @ ./node_modules/imports-loader?Blockly=../shim/blocks_compressed_vertical,goog=../shim/blockly_compressed_vertical.goog!./node_modules/exports-loader?Blockly!./msg/messages.js
 @ ./shim/blocks_compressed_vertical-blockly_compressed_vertical-messages.js
 @ ./node_modules/imports-loader?Blockly=../shim/blocks_compressed_vertical-blockly_compressed_vertical-messages,goog=../shim/blockly_compressed_vertical.goog!./node_modules/exports-loader?Blockly!./msg/scratch_msgs.js
 @ ./shim/vertical.js

Child
Hash: 81e9e8f8c1ffe60f3acf
Time: 2506ms
Built at: 15/11/2024 10:11:08
Asset Size Chunks Chunk Names
horizontal.js 1.21 MiB horizontal [emitted] horizontal
vertical.js 1.21 MiB vertical [emitted] vertical
Entrypoint horizontal = horizontal.js
Entrypoint vertical = vertical.js
[./node_modules/imports-loader/index.js?Blockly=../shim/blocks_compressed_horizontal,goog=../shim/blockly_compressed_horizontal.goog!./node_modules/exports-loader/index.js?Blockly!./msg/messages.js] ./node_modules/imports-loader?Blockly=../shim/blocks_compressed_horizontal,goog=../shim/blockly_compressed_horizontal.goog!./node_modules/exports-loader?Blockly!./msg/messages.js 15.7 KiB {horizontal} [built]
[./node_modules/imports-loader/index.js?Blockly=../shim/blocks_compressed_horizontal-blockly_compressed_horizontal-messages,goog=../shim/blockly_compressed_horizontal.goog!./node_modules/exports-loader/index.js?Blockly!./msg/scratch_msgs.js] ./node_modules/imports-loader?Blockly=../shim/blocks_compressed_horizontal-blockly_compressed_horizontal-messages,goog=../shim/blockly_compressed_horizontal.goog!./node_modules/exports-loader?Blockly!./msg/scratch_msgs.js 1.08 MiB {horizontal} [built]
[./node_modules/imports-loader/index.js?Blockly=../shim/blocks_compressed_vertical,goog=../shim/blockly_compressed_vertical.goog!./node_modules/exports-loader/index.js?Blockly!./msg/messages.js] ./node_modules/imports-loader?Blockly=../shim/blocks_compressed_vertical,goog=../shim/blockly_compressed_vertical.goog!./node_modules/exports-loader?Blockly!./msg/messages.js 15.7 KiB {vertical} [built]
[./node_modules/imports-loader/index.js?Blockly=../shim/blocks_compressed_vertical-blockly_compressed_vertical-messages,goog=../shim/blockly_compressed_vertical.goog!./node_modules/exports-loader/index.js?Blockly!./msg/scratch_msgs.js] ./node_modules/imports-loader?Blockly=../shim/blocks_compressed_vertical-blockly_compressed_vertical-messages,goog=../shim/blockly_compressed_vertical.goog!./node_modules/exports-loader?Blockly!./msg/scratch_msgs.js 1.08 MiB {vertical} [built]
[./shim/blockly_compressed_horizontal.goog.js] 66 bytes {horizontal} [built]
[./shim/blockly_compressed_horizontal.js] 118 bytes {horizontal} [built]
[./shim/blockly_compressed_vertical.goog.js] 64 bytes {vertical} [built]
[./shim/blockly_compressed_vertical.js] 116 bytes {vertical} [built]
[./shim/blocks_compressed_horizontal-blockly_compressed_horizontal-messages.js] 176 bytes {horizontal} [built]
[./shim/blocks_compressed_horizontal.js] 162 bytes {horizontal} [built]
[./shim/blocks_compressed_vertical-blockly_compressed_vertical-messages.js] 172 bytes {vertical} [built]
[./shim/blocks_compressed_vertical.js] 203 bytes {vertical} [built]
[./shim/horizontal.js] 219 bytes {horizontal} [built]
[./shim/vertical.js] 213 bytes {vertical} [built]

ERROR in ./shim/blockly_compressed_horizontal.js
Module not found: Error: Can't resolve '../blockly_compressed_horizontal' in 'C:\scratch-blocks\shim'
 @ ./shim/blockly_compressed_horizontal.js 1:17-116
 @ ./shim/blockly_compressed_horizontal.goog.js
 @ ./node_modules/imports-loader?Blockly=../shim/blocks_compressed_horizontal-blockly_compressed_horizontal-messages,goog=../shim/blockly_compressed_horizontal.goog!./node_modules/exports-loader?Blockly!./msg/scratch_msgs.js
 @ ./shim/horizontal.js

ERROR in ./shim/blockly_compressed_vertical.js
Module not found: Error: Can't resolve '../blockly_compressed_vertical' in 'C:\scratch-blocks\shim'
 @ ./shim/blockly_compressed_vertical.js 1:17-114
 @ ./shim/blockly_compressed_vertical.goog.js
 @ ./node_modules/imports-loader?Blockly=../shim/blocks_compressed_vertical-blockly_compressed_vertical-messages,goog=../shim/blockly_compressed_vertical.goog!./node_modules/exports-loader?Blockly!./msg/scratch_msgs.js
 @ ./shim/vertical.js

ERROR in ./shim/blocks_compressed_horizontal.js
Module not found: Error: Can't resolve '../blocks_compressed_horizontal' in 'C:\scratch-blocks\shim'
 @ ./shim/blocks_compressed_horizontal.js 1:17-160
 @ ./node_modules/imports-loader?Blockly=../shim/blocks_compressed_horizontal,goog=../shim/blockly_compressed_horizontal.goog!./node_modules/exports-loader?Blockly!./msg/messages.js
 @ ./shim/blocks_compressed_horizontal-blockly_compressed_horizontal-messages.js
 @ ./node_modules/imports-loader?Blockly=../shim/blocks_compressed_horizontal-blockly_compressed_horizontal-messages,goog=../shim/blockly_compressed_horizontal.goog!./node_modules/exports-loader?Blockly!./msg/scratch_msgs.js
 @ ./shim/horizontal.js

ERROR in ./shim/blocks_compressed_vertical.js
Module not found: Error: Can't resolve '../blocks_compressed_vertical' in 'C:\scratch-blocks\shim'
 @ ./shim/blocks_compressed_vertical.js 1:17-201
 @ ./node_modules/imports-loader?Blockly=../shim/blocks_compressed_vertical,goog=../shim/blockly_compressed_vertical.goog!./node_modules/exports-loader?Blockly!./msg/messages.js
 @ ./shim/blocks_compressed_vertical-blockly_compressed_vertical-messages.js
 @ ./node_modules/imports-loader?Blockly=../shim/blocks_compressed_vertical-blockly_compressed_vertical-messages,goog=../shim/blockly_compressed_vertical.goog!./node_modules/exports-loader?Blockly!./msg/scratch_msgs.js
 @ ./shim/vertical.js

Child
Hash: f2c3aecb57eb06551de2
Time: 5899ms
Built at: 15/11/2024 10:11:12
Asset Size Chunks

Entrypoint main = main.js
[./shim/gh-pages.js] 28 bytes {main} [built]

npm error code 2
npm error path C:\scratch-blocks
npm error command failed
npm error command C:\WINDOWS\system32\cmd.exe /d /s /c python build.py && webpack
npm error A complete log of this run can be found in: C:\Users\Luis\AppData\Local\npm-cache_logs\2024-11-15T09_10_00_315Z-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:

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

I try to install scratch-blokcs but it is imposible.

My systems is Windows 11 and I implement WSL to try if Windows was the problem but not.

I follow other things to resolve the issue like #833 or

https://github.com/scratchfoundation/scratch-blocks/wiki

It is impossible to install

@Robotikaforkids
Copy link
Author

Solved

I change many things in different files and solve it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant