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

Public demo of field-colour-hsv-sliders does not launch #1894

Closed
laurensvalk opened this issue Sep 5, 2023 · 5 comments · Fixed by #1974
Closed

Public demo of field-colour-hsv-sliders does not launch #1894

laurensvalk opened this issue Sep 5, 2023 · 5 comments · Fixed by #1974
Assignees
Labels
type: bug Something isn't working

Comments

@laurensvalk
Copy link
Contributor

Category

  • Plugins

Component

field-colour-hsv-sliders

Describe the bug

The public demo has Uncaught Error: Cannot find module '@blockly/field-colour' and does not launch the demo.

To Reproduce

Open https://google.github.io/blockly-samples/plugins/field-colour-hsv-sliders/test/index.html

Expected behavior

Working demo.

Screenshots

image

Additional context

Possibly related to imports as in #1892

@rachel-fenichel
Copy link
Collaborator

@johnnesky can you take a look this Friday?

@johnnesky
Copy link
Member

Sure, I can take a look.

@johnnesky johnnesky self-assigned this Sep 6, 2023
@johnnesky
Copy link
Member

johnnesky commented Sep 8, 2023

The field-colour-hsv-sliders plugin depends on the field-colour plugin. Both plugins are published on npm with a dist/ folder.

However, in local testing, the hsv plugin's node_modules folder contains an alias pointing to field-colour in my copy of the repo, not the one published on npm, and my version doesn't contain the dist/ folder by default. If I navigate to field-colour and run npm run build, then back to field-colour-hsv-sliders and run npm run start, it succeeds.

Beka pointed out that the public demos are published by running npm run test:ghpages at root. This runs npm run predeploy on each of the plugins. It alphabetically handles field-colour first, which adds a dist/ folder containing declaration files but no index.js file, and then runs predeploy on field-colour-hsv-sliders, which reports "Can't resolve '@blockly/field-colour'". If I manually build field-colour, that adds the index.js file to dist/, after which I can run predeploy in field-colour-hsv-sliders without any problem.

Apparently predeploy does not add index.js files to dist/ folders. Another consideration is that we may be relying on the plugins being predeployed in a certain order.

May also be related to: #1877

@johnnesky johnnesky removed their assignment Sep 18, 2023
@BeksOmega
Copy link
Contributor

This needs to be reassigned to a member of the core team.

@maribethb
Copy link
Contributor

The demo is fixed now due to #1992 against the master branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants