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

[Bug]: decodeEntities option is required in browser builds #25523

Closed
p3k opened this issue Jan 9, 2024 · 6 comments · Fixed by #25773
Closed

[Bug]: decodeEntities option is required in browser builds #25523

p3k opened this issue Jan 9, 2024 · 6 comments · Fixed by #25773

Comments

@p3k
Copy link

p3k commented Jan 9, 2024

Describe the bug

While stories render fine, the following error is thrown in the dev console:

error Error: [@vue/compiler-core] decodeEntities option is required in browser builds.
    at baseParse (compiler-core.esm-bundler.js:2586:1)
    at getComponents (entry-preview-docs.mjs:8:1)
    at getTemplateComponents (entry-preview-docs.mjs:8:1)
    at generateSource (entry-preview-docs.mjs:8:1)
    at immediate (entry-preview-docs.mjs:8:1)
    at callWithErrorHandling (runtime-core.esm-bundler.js:158:1)
    at callWithAsyncErrorHandling (runtime-core.esm-bundler.js:166:1)
    at job (runtime-core.esm-bundler.js:1827:1)
    at doWatch (runtime-core.esm-bundler.js:1858:1)
    at watch (runtime-core.esm-bundler.js:1716:1)#

To Reproduce

not sure I can provide this… 😬

System

Storybook Environment Info:

  System:
    OS: Linux 6.2 Debian GNU/Linux 12 (bookworm) 12 (bookworm)
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
    Shell: 5.2.15 - /bin/bash
  Binaries:
    Node: 18.19.0 - /tmp/xfs-38cf59af/node
    Yarn: 4.0.2 - /tmp/xfs-38cf59af/yarn <----- active
    npm: 10.2.3 - /usr/local/bin/npm
  npmPackages:
    @storybook/addon-actions: 7.6.7 => 7.6.7 
    @storybook/addon-essentials: 7.6.7 => 7.6.7 
    @storybook/addon-links: 7.6.7 => 7.6.7 
    @storybook/vue3: 7.6.7 => 7.6.7 
    @storybook/vue3-webpack5: 7.6.7 => 7.6.7 
    eslint-plugin-storybook: 0.6.15 => 0.6.15 
    storybook: 7.6.7 => 7.6.7

Additional context

Might be related to / duplicate of #25496.

Searching for decodeEntities in the Storybook documentation yields no results:

storybook js org_

@chakAs3
Copy link
Contributor

chakAs3 commented Jan 23, 2024

Please @p3k if you can't reproduce the bug, a PR may introduce another bug that you don't see. so please create a reproduction repo, i will help you fix your issue inshallah.

@chakAs3 chakAs3 self-assigned this Jan 23, 2024
@susnux
Copy link

susnux commented Jan 24, 2024

That error comes from the Vue sfc-compiler, so something wrong with the vue integration of storybook.

I also get this error, but for me the source code of stories is also broken, so this might be related?

@Hai-San
Copy link

Hai-San commented Jan 25, 2024

Same here.

The Source code does not appear here either.

I have the same version in vue2 and it works normally.

@Michael2109
Copy link

@chakAs3 Do you know which version of Vue decodeEntities became required? I'm wondering if a temporary workaround is to downgrade although that could likely lead to other issues.

@chakAs3
Copy link
Contributor

chakAs3 commented Feb 3, 2024

decodeEntities only used for DOM compilers that runs in the browser.
In non-browser builds, this option is ignored.
i think it is not about Vue if the browser requires that it will throw
downgrading won't solve the issue

@JakeHarder
Copy link

JakeHarder commented Feb 7, 2024

I also see this error. I have a few stories, but I only see this error for a component that uses Vue's Date Picker.
My package.json has:
"vuejs3-datepicker": "^1.1.2"
My exact error is:

error Error: [@vue/compiler-core] decodeEntities option is required in browser builds.
    at baseParse (compiler-core.esm-bundler.js:2591:13)
    at getComponents (entry-preview-docs.mjs:8:404)
    at getTemplateComponents (entry-preview-docs.mjs:8:264)
    at generateSource (entry-preview-docs.mjs:8:2799)
    at watch.immediate (entry-preview-docs.mjs:8:2608)
    at callWithErrorHandling (runtime-core.esm-bundler.js:193:18)
    at callWithAsyncErrorHandling (runtime-core.esm-bundler.js:201:17)
    at job (runtime-core.esm-bundler.js:1943:9)
    at doWatch (runtime-core.esm-bundler.js:1981:7)
    at watch (runtime-core.esm-bundler.js:1808:10)

npm ls gives:

├── @storybook/addon-essentials@7.6.11
├── @storybook/addon-interactions@7.6.11
├── @storybook/addon-links@7.6.11
├── @storybook/blocks@7.6.11
├── @storybook/test@7.6.11
├── @storybook/testing-library@0.2.2
├── @storybook/vue3-vite@7.6.11
├── @storybook/vue3@7.6.11
├── @syncfusion/ej2-vue-gantt@24.1.45
├── @syncfusion/ej2-vue-schedule@24.1.41
├── @vitejs/plugin-vue@5.0.3
├── @vue/test-utils@2.4.3
├── ag-grid-community@31.0.1
├── ag-grid-enterprise@31.0.1
├── ag-grid-vue3@31.0.1
├── jest-serializer-vue@3.1.0
├── lodash@4.17.21
├── popper.js@1.16.1
├── react-dom@18.2.0
├── react@18.2.0
├── sass@1.70.0
├── storybook@7.6.11
├── vite@5.0.12
├── vitest@1.2.2
├── vue-template-compiler@2.7.16
├── vue@3.4.15
├── vuedraggable@2.24.3
└── vuejs3-datepicker@1.1.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants