Module build failed
发布于 14天前 作者 remembergf 133 次浏览 来自 问答

在使用vue全家桶进行一个音乐播放器APP的构建时,总是会弹出模板错误,报错信息如下:

./node_modules/css-loader?{"sourceMap":true}!./node_modules/vue-loader/lib/style-compiler?{"vue":true,"id":"data-v-be498722","scoped":true,"hasInlineConfig":false}!./node_modules/stylus-loader?{"sourceMap":true}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/components/m-header/m-header.vue Module build failed: Error: F:\music-player\src\components\m-header\m-header.vue:12:9 8| <script> 9| export default{} 10| </script> 11| <style scoped lang="stylus" rel="stylesheet/stylus"> 12| @import “@/common/stylus/variable” ---------------^ 13| @import “@/common/stylus/mixin” 14| .m-header 15| position: relative

failed to locate @import file @/common/stylus/variable.styl

at CachedPathEvaluator.visitImport (F:\music-player\node_modules\stylus-loader\lib\evaluator.js:157:21)
at CachedPathEvaluator.Visitor.visit (F:\music-player\node_modules\stylus\lib\visitor\index.js:28:40)
at CachedPathEvaluator.Evaluator.visit (F:\music-player\node_modules\stylus\lib\visitor\evaluator.js:160:18)
at CachedPathEvaluator.Evaluator.visitRoot (F:\music-player\node_modules\stylus\lib\visitor\evaluator.js:707:27)
at CachedPathEvaluator.Visitor.visit (F:\music-player\node_modules\stylus\lib\visitor\index.js:28:40)
at CachedPathEvaluator.Evaluator.visit (F:\music-player\node_modules\stylus\lib\visitor\evaluator.js:160:18)
at CachedPathEvaluator.Evaluator.evaluate (F:\music-player\node_modules\stylus\lib\visitor\evaluator.js:247:15)
at Renderer.render (F:\music-player\node_modules\stylus\lib\renderer.js:86:26)
at F:\music-player\node_modules\stylus-loader\index.js:167:12
at tryCatchReject (F:\music-player\node_modules\when\lib\makePromise.js:840:30)
at runContinuation1 (F:\music-player\node_modules\when\lib\makePromise.js:799:4)
at Fulfilled.when (F:\music-player\node_modules\when\lib\makePromise.js:590:4)
at Pending.run (F:\music-player\node_modules\when\lib\makePromise.js:481:13)
at Scheduler._drain (F:\music-player\node_modules\when\lib\Scheduler.js:62:19)
at Scheduler.drain (F:\music-player\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-be498722","scoped":true,"hasInlineConfig":false}!./node_modules/stylus-loader?{"sourceMap":true}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/components/m-header/m-header.vue 4:14-384 13:3-17:5 14:22-392 @ ./src/components/m-header/m-header.vue @ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/App.vue @ ./src/App.vue @ ./src/main.js @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/main.js

查找了资料,说是stylus内的代码格式错误,stylus和stylus-loader都安装了,还有说是node版本和stylus-loader版本问题之间的影响, 我改了下代码,还是会一直报错,实在是不知道怎么去改了,希望大家帮我看看,谢谢了

回到顶部