mpvue新建项目报错Final loader didn't return a Buffer or String

昨天新建mpvue项目,根据官网教程来的,竟然报错了,搜了很久很多说是版本问题,结果改了版本号也不行,最后去GitHub上搜,发现还是版本的问题。原文地址。

报错信息

error in ./src/pages/index/index.vue

Module build failed: Error: Final loader didn't return a Buffer or String

at runLoaders (E:\popcornmall\node_modules\webpack\lib\NormalModule.js:204:4

6)

at E:\popcornmall\node_modules\loader-runner\lib\LoaderRunner.js:373:3

at iterateNormalLoaders (E:\popcornmall\node_modules\loader-runner\lib\Loade

rRunner.js:214:10)

at iterateNormalLoaders (E:\popcornmall\node_modules\loader-runner\lib\Loade

rRunner.js:221:10)

at E:\popcornmall\node_modules\loader-runner\lib\LoaderRunner.js:236:3

at Object.context.callback (E:\popcornmall\node_modules\loader-runner\lib\Lo

aderRunner.js:111:13)

at compileWxml.call.then.catch (E:\popcornmall\node_modules\mpvue-loader\lib

\template-compiler\index.js:99:12)

at process._tickCallback (internal/process/next_tick.js:68:7)

@ ./src/pages/index/index.vue 10:0-328

@ ./src/pages/index/main.js

原来有个mpvue-loader模块如果是1.0.19 和 1.0.20 版本会有这个问题,之后查看了package.json文件中的mpvue-loader模块的版本,确实是这个问题,之后通过npm i [email protected]解决。

你可能感兴趣的:(mpvue新建项目报错Final loader didn't return a Buffer or String)