./node_modules/_css-loader@0.28.11@css-loader?{“sourceMap”:true}!./node_modules/_vue-loader@13.7.3@vue-loader/lib/style-compiler?{“vue”:true,“id”:“data-v-7b59048f”,“scoped”:true,“hasInlineConfig”:false}!./node_modules/_stylus-loader@6.1.0@stylus-loader/dist/cjs.js?{“sourceMap”:true}!./node_modules/_vue-loader@13.7.3@vue-loader/lib/selector.js?type=styles&index=0!./src/components/Search/Search.vue
Module build failed: TypeError: this.getOptions is not a function
peerDependencies WARNING stylus-loader@latest requires a peer of webpack@^5.0.0 but webpack@3.12.0 was installed
因为是 webpack@3.12.0 ,不支持新版的stylus-loader@6.1.0
https://blog.csdn.net/weixin_43409994/article/details/114632478
于是去找低版本的
https://www.npmjs.com/package/stylus-loader/v/2.1.2
cnpm i stylus-loader@2.1.2 --save-dev
下载之后还是一样,我猜想是用的之前的缓存吧,也许要重新 cnpm run dev了。 但是还是先去试了一下 uninstall,
cnpm uninstall stylus-loader@6.1.0
不过这个 uninstall 的过程非常奇怪,会先下载一些东西,才开始卸载。可能是下载卸载工具吧,我也不懂。然后花很长时间
然后卸载完之后,我的依赖就炸了。axios好像没了
./node_modules/_axios@0.18.1@axios/index.js Module build failed:
Error: ENOENT: no such file or directory, open
‘G:\project\vue\HuNanGovernmentTransportationPlatform\node_modules_axios@0.18.1@axios\index.js’
@ ./src/common/common.js 3:0-26 @ ./src/router/index.js @
./src/main.js @ multi
./node_modules/_webpack-dev-server@2.11.5@webpack-dev-server/client?http://localhost:8082
webpack/hot/dev-server ./src/main.js
Module build failed: Error: ENOENT: no such file or directory, open
听说是 rebuild
https://blog.csdn.net/sinat_41432025/article/details/90514850
但是不知道哪里的问题,没有用
因此就只能停掉服务,重新 npm run dev 了