Module build failed: TypeError: this.getOptions is not a function at Object.stylusLoader

error in ./src/pages/home/components/Header.vue

Module build failed: TypeError: this.getOptions is not a function
at Object.stylusLoader (/Users/rockygao/Data/wwwroot/travel/node_modules/[email protected]@stylus-loader/dist/index.js:17:24)

@ ./node_modules/[email protected]@vue-style-loader!./node_modules/[email protected]@css-loader?{“sourceMap”:true}!./node_modules/[email protected]@vue-loader/lib/style-compiler?{“vue”:true,“id”:“data-v-5558831a”,“scoped”:true,“hasInlineConfig”:false}!./node_modules/[email protected]@stylus-loader/dist/cjs.js?{“sourceMap”:true}!./node_modules/[email protected]@vue-loader/lib/selector.js?type=styles&index=0!./src/pages/home/components/Header.vue 4:14-476 13:3-17:5 14:22-484
@ ./src/pages/home/components/Header.vue
@ ./node_modules/[email protected]@babel-loader/lib!./node_modules/[email protected]@vue-loader/lib/selector.js?type=script&index=0!./src/pages/home/Home.vue
@ ./src/pages/home/Home.vue
@ ./src/router/index.js
@ ./src/main.js
@ multi ./node_modules/[email protected]@webpack-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/main.js

原因:stylus-loader安装的版本过高
解决方案:
1.cnpm uninstall stylus-loader
2.cnpm i [email protected] -S

你可能感兴趣的:(技术,vue.js,javascript,npm)