Skip to content
This repository was archived by the owner on Mar 8, 2019. It is now read-only.

Conversation

Globegitter
Copy link

When using bazel the node_modules are not at the default so I am getting the following error when using vue styleguidist:

Error: Cannot find module '@babel/plugin-proposal-object-rest-spread' from '/path/to/styleguide.runfiles/__main__'

Warning: Cannot parse vue/components/icons/icon-base.vue: Error: Error: Cannot find module '@babel/plugin-proposal-object-rest-spread' from '/path/to/styleguide.runfiles/__main__'

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

It seems to me that is due to babel doing its own module/plugin resolution and not using the default require under the hood. Some issues on that topic: babel/babel#7952, babel/babel#6664 & babel/babel#5618

Just requiring the plugins and presets at the top of the file fixes the issue.

@elevatebart elevatebart merged commit aede83b into vue-styleguidist:master Dec 18, 2018
@elevatebart
Copy link
Member

Hey @Globegitter, you are on fire today !! thank you for all the good work it looks clever and nicely done.

@vue-styleguidist-bot
Copy link
Collaborator

🎉 This PR is included in version 2.6.11 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants