blockly-samples icon indicating copy to clipboard operation
blockly-samples copied to clipboard

Building/Running a plugin should build its dependencies

Open maribethb opened this issue 1 month ago • 0 comments

Check for duplicates

  • [x] I have searched for similar issues before opening a new one.

Component

plugins

Description

If you've never built the theme plugins, you'll get an error (stack trace below) that node can't find the dependencies. You shouldn't have to manually build all the plugins before running a plugin that uses the themes. Either the webpack config or the lerna config should ensure that all the prerequisite dependencies have already been built. I think this is lerna's job but I need to look more into it to confirm.

Workaround: run npm run build at the root of samples to build all the plugins before running npm start to try to run an individual plugin that uses the advanced playground

Reproduction steps

  1. Check out a fresh clone of blockly-samples (it's possible you could also recreate this by running npm run clean and then following the below steps, but I haven't tried because i'm having some issues with npm at the moment)
  2. npm ci
  3. cd plugins/field-multilineinput (or any plugin that uses the advanced playground)
  4. npm start

If you've never built the plugins before you'll see the below error. If you have, the plugin should start normally.

Stack trace

ERROR in ../dev-tools/src/playground/options.js 24:0-44
Module not found: Error: Can't resolve '@blockly/theme-dark' in '/usr/local/google/home/rbourret/blockly-samples/plugins/dev-tools/src/playground'
 @ ../dev-tools/src/index.js 25:19-65
 @ ./test/field_multilineinput_test.mocha.js 7:22-51

Screenshots

No response

maribethb avatar Nov 04 '25 19:11 maribethb