arielsalminen / vue-design-system

An open source tool for building UI Design Systems with Vue.js
https://vueds.com
MIT License
2.17k stars 225 forks source link

[Help Needed] - Error thrown when starting design system in dev mode #149

Closed ftom2 closed 5 years ago

ftom2 commented 5 years ago

I'm using vue-design-system V3.5.6.

It all worked fine for a while, but for some reason, I can't run it now in dev mode.

When I run yarn start I get this error:

TypeError: Cannot read property 'filter' of undefined at webpackConfig.module.rules.rules.map.rule (C:\aquaprojects\src\bitbucket.org\scalock\server\aqua-design-system\node_modules\vue-styleguidist\scripts\utils\mergeWebpackConfigVue

CLI.js:34:20)

this is the problematic code from mergeWebpackConfigVue.js:

webpackConfig.module.rules = rules.map(rule => {
            if (rule.test && rule.test.test('.vue')) {
                return {
                    test: rule.test,
                    use: rule.use.filter(use => use.loader === 'vue-loader'),
                };
            }
            return rule;
        });

I did not make any change to the config files, and when I log the webpack rules in webpack.dev.conf.js, I can see it does contain a 'vue-loader' rule.

yarn build:system does work.

peiledoir commented 5 years ago

@ftom2 Having the same issue here, what did you do to solve it?

Update Was using vue-design-system inside another directory. The parent level node_modules was causing the issue for me.