老师您好,我按课件里装了stylus,就启动不起来了

来源:7-1 Vue项目首页 - header区域开发

Escanor

2020-10-13

老师您好,我按课件里装了stylus,就启动不起来了,css-loader版本从0.28.0改成了0.28.7仍然不行,请问是stylus和stylus-loader的版本也有问题吗?stylus版本是0.54.8,stylus-loader是4.1.1

写回答

2回答

新world

2020-10-16

我安装了 ,可还是报错误啊,错误信息如下

> travel@1.0.0 dev C:\Users\Administrator\Desktop\travel

> webpack-dev-server --inline --progress --config build/webpack.dev.conf.js


 14% building modules 36/42 modules 6 active ...esktop\travel\src\pages\home\Home.vue{ parser: "babylon" } is deprecated; we now treat it as { parser: "babel" }.

 94% asset optimization ERROR  Failed to compile with 1 errors09:07:11


 error  in ./src/pages/home/Home.vue


Syntax Error: C:\Users\Administrator\Desktop\travel\node_modules\_mkdirp@1.0.4@mkdirp\lib\opts-arg.js:7

    opts = { mode: 0o777, fs, ...opts }

                              ^^^


SyntaxError: Unexpected token ...



 @ ./node_modules/_vue-style-loader@3.1.2@vue-style-loader!./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-0c57a6db","scoped":true,"hasInlineConfig":false}!./node_modules/_stylus-loader@3.0.1@stylus-loader?{"sourceMap":true}!./node_modules/_vue-loader@13.7.3@vue-loader/lib/selector.js?type=styles&index=0!./src/pages/home/Home.vue 4:14-459 13:3-17:5 14:22-467

 @ ./src/pages/home/Home.vue

 @ ./src/router/index.js

 @ ./src/main.js

 @ multi ./node_modules/_webpack-dev-server@2.11.5@webpack-dev-server/client?http://localhost:8089 webpack/hot/dev-server ./src/main.js


0
1
Dell
npm install stylus@0.54.5 --save npm install stylus-loader@3.0.1 --save
2020-10-17
共1条回复

Samrtiboy

2020-10-13

同学你好,你可以尝试将stylus-loader版本降级到3.0.2,看看能否正常启动。


0
0

Vue2.5-2.6-3.0开发去哪儿网App 零基础入门到实战

课程紧跟Vue3版本迭代,企业主流版本Vue2+Vue3全掌握

10675 学习 · 8191 问题

查看课程