Discuss Scratch

crater24
Scratcher
12 posts

How to set up your development environment for making extensions

ScratchAtWPS wrote:

This is not really an answer to SimpleScratch, because I'm still trying to grok _how_ to put the pieces together, but one piece of the puzzle, I believe, is https://github.com/LLK/scratch-vm/wiki/Scratch-3.0-Extensions-Specification, the “Scratch 3.0 Extensions Specification Annotated example”.

What I really want is a walk-through/tutorial to go from zero to extension creation. It looks like PullJosh has kindly written chapter 1.

<rant>Did they really have to make it so hard? Why not have Scratch upload an XML/JavaScript configuration if you want to? I thought the age of “priestly knowledge” in computer applications went out over a decade ago. And this from LLK??? </rant>

Basic Extension Creation: https://scratch.mit.edu/discuss/topic/277217/ (by NitroCipher)
Uploading an Extension to Scratch GUI https://scratch.mit.edu/discuss/topic/607994/?page=1#post-6344916

Last edited by crater24 (May 27, 2022 05:54:18)

MinerMan563
Scratcher
74 posts

How to set up your development environment for making extensions

How do you edit the code?
CodeSoft_Games
Scratcher
11 posts

How to set up your development environment for making extensions

lorenzo1571 wrote:

Is it then possible to deploy the personl version of Scratch to your own web server?
I mean, on the web, not localhost
What you should do is load into your command line and type npm build. it will create a build folder in scratch-vm with html5 files. Then you can upload that to a web server.
NatalieWYang
Scratcher
10 posts

How to set up your development environment for making extensions

Look at the sound blocks
play sound [ v]
play sound [ v] until done
stop all sounds
change volume by ()
set volume to () %
(volume)
set tempo to () bpm

Last edited by NatalieWYang (July 8, 2022 16:33:06)

NatalieWYang
Scratcher
10 posts

How to set up your development environment for making extensions

(distance to [white gummy bear v])
CyberVen
Scratcher
8 posts

How to set up your development environment for making extensions

I tried to install for scratch-gui, but got this script in response.
Thanks for your help.

…$ npm audit fix –force
npm WARN using –force Recommended protections disabled.
npm WARN audit fix semver@7.3.7 node_modules/npm/node_modules/semver
npm WARN audit fix semver@7.3.7 is a bundled dependency of
npm WARN audit fix semver@7.3.7 npm@8.19.4 at node_modules/npm
npm WARN audit fix semver@7.3.7 It cannot be fixed automatically.
npm WARN audit fix semver@7.3.7 Check for updates to the npm package.
npm WARN audit Updating webpack-dev-server to 3.11.3, which is outside your stated dependency range.
npm WARN audit Updating html-webpack-plugin to 5.5.3, which is a SemVer major change.
npm WARN audit Updating uglifyjs-webpack-plugin to 1.1.2, which is a SemVer major change.
npm WARN audit Updating css-loader to 6.8.1, which is a SemVer major change.
npm WARN audit Updating undefined to undefined, which is a SemVer major change.
npm ERR! code ETARGET
npm ERR! notarget No matching version found for undefined@undefined.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
….
… $ npm start
….
npm ERR! A complete log of this run can be found in: /home/magoo/.npm/_logs/2023-09-05T13_09_32_042Z-debug-0.log


at FSReqCallback.readFileAfterClose (node:internal/fs/read/context:68:3) {
opensslErrorStack: ,
library: ‘digital envelope routines’,
reason: ‘unsupported’,
code: ‘ERR_OSSL_EVP_UNSUPPORTED’
}
CyberVen
Scratcher
8 posts

How to set up your development environment for making extensions

I solved the problem, it was due to me forgetting the following instruction: export NODE_OPTIONS=–openssl-legacy-provider
CyberVen
Scratcher
8 posts

How to set up your development environment for making extensions

I tried to carry out the procedure, but it doesn't load the page relating to my extension, I think this error is due to this:
opensslErrorStack: ,
library: ‘digital envelope routines’,
reason: ‘unsupported’,
code: ‘ERR_OSSL_EVP_UNSUPPORTED’
}
….
Node.js v18.17.1

npm –version
10.1.0

Can anyone help me?
CyberVen
Scratcher
8 posts

How to set up your development environment for making extensions

As for scratch-gui, also for scratch-vm, I had the same problem.
After having followed the procedure indicated on the page https://github.com/scratchfoundation/scratch-vm step by step

while managing to launch localhost with the sequence of these commands:
…$:~/2023_D/scratch_qbo/scratch-vm$ set NODE_OPTIONS=–openssl-legacy-provider
…$:~/2023_D/scratch_qbo/scratch-vm$ export NODE_OPTIONS=–openssl-legacy-provider
…$:~/2023_D/scratch_qbo/scratch-vm$ npm start
the link opens
http://localhost:8073/playground/
but you don't have access to the project.

Boss_1s
Scratcher
100+ posts

How to set up your development environment for making extensions

I tried npm install but it gave me the following error:

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

Traceback (most recent call last):
File “/workspaces/scratch-blocks/scratch-blocks/build.py”, line 39, in <module>
raise Exception(“Blockly build only compatible with Python 2.x.\n”
Exception: Blockly build only compatible with Python 2.x.
You are using: 3.10.8 (main, Oct 5 2023, 20:05:15)
npm ERR! code 1
npm ERR! path /workspaces/scratch-blocks/scratch-blocks
npm ERR! command failed
npm ERR! command sh -c python build.py && webpack

npm ERR! A complete log of this run can be found in: /home/codespace/.npm/_logs/2023-10-20T17_34_08_713Z-debug-0.log
HakunaJin
New Scratcher
7 posts

How to set up your development environment for making extensions

Hello. Are you using scratch-link by any chance?
Currently, I'm trying to connect to the hardware using BT, but I'm having a problem with Bluetooth constantly disconnecting. It appears that the data is not coming in and is accumulating in the buffer, but is interrupted when the buffer accumulates too much.
How should I solve this part?

Powered by DjangoBB