为了账号安全,请及时绑定邮箱和手机立即绑定

win10安装了npm install stylus和 npm install stylus-loader完成后webstrom报错

<style lang="stylus" type="text/stylus" scoped> .header  height: 43px;</style>报错: error  in ./src/pages/home/components/Header.vueModule build failed: ParseError: D:\WSzuoye\Travel\src\pages\home\components\Header.vue:15:14   11|   12|   13|   14| .header   15| height: 43px;--------------------^   16|expected "indent", got ";"    at Parser.error (D:\WSzuoye\Travel\node_modules\stylus\lib\parser.js:259:11)    at Parser.expect (D:\WSzuoye\Travel\node_modules\stylus\lib\parser.js:287:12)    at Parser.block (D:\WSzuoye\Travel\node_modules\stylus\lib\parser.js:845:12)    at Parser.selector (D:\WSzuoye\Travel\node_modules\stylus\lib\parser.js:1555:24)    at Parser.stmt (D:\WSzuoye\Travel\node_modules\stylus\lib\parser.js:797:27)    at Parser.statement (D:\WSzuoye\Travel\node_modules\stylus\lib\parser.js:685:21)    at Parser.parse (D:\WSzuoye\Travel\node_modules\stylus\lib\parser.js:236:25)    at Renderer.render (D:\WSzuoye\Travel\node_modules\stylus\lib\renderer.js:80:22)    at D:\WSzuoye\Travel\node_modules\stylus-loader\index.js:167:12    at tryCatchReject (D:\WSzuoye\Travel\node_modules\when\lib\makePromise.js:840:30)    at runContinuation1 (D:\WSzuoye\Travel\node_modules\when\lib\makePromise.js:799:4)    at Fulfilled.when (D:\WSzuoye\Travel\node_modules\when\lib\makePromise.js:590:4)    at Pending.run (D:\WSzuoye\Travel\node_modules\when\lib\makePromise.js:481:13)    at Scheduler._drain (D:\WSzuoye\Travel\node_modules\when\lib\Scheduler.js:62:19)    at Scheduler.drain (D:\WSzuoye\Travel\node_modules\when\lib\Scheduler.js:27:9)    at _combinedTickCallback (internal/process/next_tick.js:131:7) @ ./node_modules/vue-style-loader!./node_modules/css-loader?{"sourceMap":true}!./node_modules/vue-loader/lib/style-compiler?{"vue":true,"id":"data-v-5939bb14","scoped":true,"hasInlineConfig":false}!./node_modules/stylus-loader?{"sourceMap":true}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/pages/home/components/Header.vue 4:14-394 13:3-17:5 14:22-402 @ ./src/pages/home/components/Header.vue @ ./node_modules/babel-loader/lib!./node_modules/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 (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/main.js​

正在回答

2 回答

不是光install就可以的,还要再webpack.congfig.js里面进行配置,你的stylus-loader才能生效。

0 回复 有任何疑惑可以回复我~

跟你报了好像是一样的错误,你的问题解决了吗

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

win10安装了npm install stylus和 npm install stylus-loader完成后webstrom报错

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信