Discuss Scratch

grrr-_
Scratcher
11 posts

npm install scratch-blocks having error

so I want to make a scratch mod but during the npm install part for scratch-blocks its showing an error, here it is:

$ npm install

> scratch-blocks@0.1.0 prepublish
> python build.py && webpack

Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
npm ERR! code 9009
npm ERR! path C:\Users\ADMIN\Documents\sttgMod\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:
npm ERR! C:\Users\ADMIN\AppData\Local\npm-cache\_logs\2022-02-23T07_59_28_319Z-debug-0.log


Im using python 2.7.2, can anyone help me?



dhuls
Scratcher
1000+ posts

npm install scratch-blocks having error

Building scratch-blocks on Windows, from what I've heard, is a mess.
Try using Windows Subsystem for Linux, and more help can be found here.
CST1229
Scratcher
1000+ posts

npm install scratch-blocks having error

dhuls wrote:

(#2)
Building scratch-blocks on Windows, from what I've heard, is a mess.
Try using Windows Subsystem for Linux, and more help can be found here.
You could try applying the changes from this PR to make Windows builds work, and you might want to change your package.json to point to your Python 2 installation if it isn't directly at “python” too edit: nevermind, the OP already uses Python 2.

Last edited by CST1229 (March 2, 2022 06:09:47)

kccuber
Scratcher
1000+ posts

npm install scratch-blocks having error

Hey, can you please reinstall python 2 but this time select the Add to PATH on the install screen where it says “Customize Python 2?”
grrr-_
Scratcher
11 posts

npm install scratch-blocks having error

kccuber wrote:

Hey, can you please reinstall python 2 but this time select the Add to PATH on the install screen where it says “Customize Python 2?”
I cant find the Add to PATH button
CST1229
Scratcher
1000+ posts

npm install scratch-blocks having error

Modify scratch-blocks' package.json to point to your Python 2 installation, for example using “python2” instead of “python”.

Powered by DjangoBB