install blockly directly from git

122 views
Skip to first unread message

rbnak

unread,
Mar 15, 2022, 1:19:39 PM3/15/22
to Blockly
i am trying to install blockly directly with npm using

but all i am getting is a clone of the source code

what am i doing wrong?

Maribeth Bottorff

unread,
Mar 17, 2022, 2:03:39 PM3/17/22
to Blockly
If you install it from git, you'd have to build and package the code yourself. You shouldn't do this unless you have a good reason to install from git instead of from npm. I'm curious why you want to do this.

But if you're sure you do, then after installing you'll have to run `npm install` then  `npm run build` and `npm run package` inside the node_modules/blockly directory. We have a script to do this automatically that you could use. Add `postinstall: blockly-scripts postinstall` to the scripts section of your package.json, and add `@blockly/dev-scripts` to the devDependencies.

If you're only doing this for debugging purposes then you can also check out this doc for alternatives: https://developers.google.com/blockly/guides/plugins/debugging

Hope that helps!

Reply all
Reply to author
Forward
0 new messages