Hey there,
i've read that there should be async support included. We currently facing the following issue:
A method:
test: async function () {
return await Promise.resolve(1)
}
causes the following bug:
Cannot parse src/components/Carousel/Carousel.vue: ReferenceError: regeneratorRuntime is not defined
It usually means that vue-docgen-api does not understand your source code or when using third-party libraries, try to file an issue here:
https://github.com/vue-styleguidist/vue-docgen-api/issues
We also using Vue-Touch (hammer.js), but that error can be reproduced on any other component by just adding that test method to it.
Please help, we want our awesome Carousel to be documented :)
Hi @bwcgn,
I tried to replicate this issue, but I couldn't,
Please share a little demo to fix it.
Regards!
Hey @rafaesc
I've created a repo (https://github.com/bwcgn/vue-styleguidist-test) but it seems to work in that environment. I guess the project Babel is messing around with some stuff. If you have any other hint, what might cause this, I'm open for any hints :)
@bwcgn did you ever solve this issue? I have the same error, it's somehow not configuring babel correctly.
doesn't work for me neither.
<script>
export default {
methods: {
async save() {};
}
}
</script>
nodejs 10.11
This snippet throws that messages.
Christ I just spent 7 hours on this so hear my wisdom (actually not mine but the one from https://github.com/styleguidist/react-styleguidist/issues/162#issuecomment-386014638):
//styleguide.config.js
module.exports = {
// ... other props unimportant to this answer here
require: ['regenerator-runtime/runtime']
}
It's 2 AM i'm going to bed
@3nuc thank you for posting your answer!
You are awesome and I am sure it will help other devs a ton.
Most helpful comment
@bwcgn did you ever solve this issue? I have the same error, it's somehow not configuring babel correctly.