Failed to use with Element-plus components library
Describe the bug
Can't launch Histoire page without errors, when using element-plus visual component library. Tried no setupFile / with setupFile, no auto import components / with auto-import components.
Reproduction
Create empty vue app with npm create vue@latest, add element-plus, add histoire, minimal config element-plus (see src/main.ts: add .css and app.use(ElementPlus)) as described here.
- Config Histoire (src/histoire.setup.ts) to use element-plus (same things as in main.ts).
1.1) When Element-plus auto import (in vite.config.ts) is OFF, get this error in browser console:
1.2) When auto import is ON, and explicitly importing component into story (src/components/First.story.vue) get error in shell:
- When no setupFile is pointed in histoire.config.ts and no auto-import used, get same error as in 1.1
System Info
Windows 10, node 20.11.1, element-plus 2.9.10, histoire 1.0.0-alpha.2
Used Package Manager
npm
Validations
- [x] Follow our Code of Conduct
- [x] Read the Contributing Guidelines.
- [x] Read the docs.
- [x] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [x] Check that this is a concrete bug. For Q&A open a GitHub Discussion.
- [x] The provided reproduction is a minimal reproducible example of the bug.
Uncaught (in promise) TypeError: Cannot read properties of null (reading 'ce')
using this version, it can work
"dependencies": {
"element-plus": "^2.9.10",
"vue": "^3.5.14",
"pinia": "^3.0.2"
},
"devDependencies": {
"@histoire/plugin-vue": "^0.17.17",
"@vitejs/plugin-vue": "^5.2.3",
"histoire": "^0.17.17",
"vite": "^5.4.19"
}