Cannot run storybook for starshot_demo subtheme

Created on 21 August 2024, 3 months ago
Updated 4 September 2024, 3 months ago

Problem/Motivation

I followed the guide on https://www.drupal.org/community-initiatives/starshot-demo-design-system... β†’ to run storybook for the subtheme starshot_demo, I run into the error

ERROR in ./components_combined/04-templates/starshot/starshot.stories.twig
Module build failed (from ./node_modules/twigjs-loader/index.js):
NonErrorEmittedError: (Emitted value instead of an instance of Error) TwigException: Twig.expression.type.variable cannot follow a Twig.expression.type.string at template:50 near 'wit...'
    at /home/dangtran/Development/Freelance/drupal_cms/web/themes/contrib/demo_design_system/starshot_demo/node_modules/webpack/lib/NormalModule.js:313:13
    at /home/dangtran/Development/Freelance/drupal_cms/web/themes/contrib/demo_design_system/starshot_demo/node_modules/loader-runner/lib/LoaderRunner.js:367:11
    at /home/dangtran/Development/Freelance/drupal_cms/web/themes/contrib/demo_design_system/starshot_demo/node_modules/loader-runner/lib/LoaderRunner.js:233:18
    at runSyncOrAsync (/home/dangtran/Development/Freelance/drupal_cms/web/themes/contrib/demo_design_system/starshot_demo/node_modules/loader-runner/lib/LoaderRunner.js:143:3)
    at iterateNormalLoaders (/home/dangtran/Development/Freelance/drupal_cms/web/themes/contrib/demo_design_system/starshot_demo/node_modules/loader-runner/lib/LoaderRunner.js:232:2)
    at Array.<anonymous> (/home/dangtran/Development/Freelance/drupal_cms/web/themes/contrib/demo_design_system/starshot_demo/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
    at Storage.finished (/home/dangtran/Development/Freelance/drupal_cms/web/themes/contrib/demo_design_system/starshot_demo/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
    at /home/dangtran/Development/Freelance/drupal_cms/web/themes/contrib/demo_design_system/starshot_demo/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
    at /home/dangtran/Development/Freelance/drupal_cms/web/themes/contrib/demo_design_system/starshot_demo/node_modules/graceful-fs/graceful-fs.js:123:16
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read/context:68:3)
 @ ./components_combined/04-templates/starshot/starshot.stories.js 4:0-61 25:9-31
 @ ./components_combined sync ^\.(?:(?:^|\/|(?:(?:(?!(?:^|\/)\.).)*?)\/)(?!\.)(?=.)[^/]*?\.stories\.js)$
 @ ./generated-stories-entry.js
 @ multi ./node_modules/@storybook/core-client/dist/esm/globals/polyfills.js ./node_modules/@storybook/core-client/dist/esm/globals/globals.js (webpack)-hot-middleware/client.js?reload=true&quiet=false&noInfo=undefined ./storybook-init-framework-entry.js ./node_modules/@storybook/html/dist/esm/client/preview/config-generated-config-entry.js ./node_modules/@storybook/addon-backgrounds/preview.js-generated-config-entry.js ./node_modules/@storybook/addon-measure/preview.js-generated-config-entry.js ./node_modules/@storybook/addon-outline/preview.js-generated-config-entry.js ./node_modules/@storybook/addon-links/preview.js-generated-config-entry.js ./node_modules/@storybook/addon-knobs/dist/preset/addDecorator.js-generated-config-entry.js ./.storybook/preview.js-generated-config-entry.js ./generated-stories-entry.js ./components_combined/00-base/collapsible/collapsible.js ./components_combined/00-base/flyout/flyout.js ./components_combined/00-base/layout/layout.js ./components_combined/00-base/responsive/responsive.js ./components_combined/00-base/scrollspy/scrollspy.js ./components_combined/01-atoms/button/button.js ./components_combined/01-atoms/chip/chip.js ./components_combined/01-atoms/table/table.js ./components_combined/02-molecules/group-filter/group-filter.js ./components_combined/02-molecules/single-filter/single-filter.js ./components_combined/02-molecules/table-of-contents/table-of-contents.js ./components_combined/02-molecules/tabs/tabs.js ./components_combined/02-molecules/tooltip/tooltip.js ./components_combined/03-organisms/alert/alert.js ./components_combined/03-organisms/slider/slider.js ./.storybook/components_css.stories.js ./webpack/assets.js ./webpack/libraries.js

Proposed resolution

There is a typo error at the line 18 of the file starshot_demo/components_combined/04-templates/starshot/starshot.stories.twig
{% embed '@base/starshot-container/starshot-container.twig' wit {constrain: true} %}
It should be {% embed '@base/starshot-container/starshot-container.twig' with {constrain: true} %}

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States sea2709 Texas

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024