ERROR in ./src/App.vue Module Error (from ./node_modules/vue-loader/lib/index.js): [vue-loader] v...
目录出错现象出错原因解决方案出错现象这个报错是我在用webpack+vue-loader的时候报的错误报错信息ERROR in ./src/App.vueModule Error (from ./node_modules/vue-loader/lib/index.js):[vue-loader] vue-template-compiler must be installed as a peer d
·
目录
- 出错现象
- 出错原因
- 解决方案
出错现象
这个报错是我在用webpack+vue-loader
的时候报的错误
- 报错信息
ERROR in ./src/App.vue
Module Error (from ./node_modules/vue-loader/lib/index.js):
[vue-loader] vue-template-compiler must be installed as a peer dependency, or a compatible compiler implementation must be passed via options.
@ ./src/main.js 2:0-27 9:17-20
ERROR in ./src/App.vue
Module build failed (from ./node_modules/vue-loader/lib/index.js):
TypeError: Cannot read property 'parseComponent' of undefined
at parse (E:\professer\lagou\lagou-homework\fed-e-task-02-02\code\vue-app-base\node_modules\@vue\component-compiler-utils\dist\parse.js:15:23)
at Object.module.exports (E:\professer\lagou\lagou-homework\fed-e-task-02-02\code\vue-app-base\node_modules\vue-loader\lib\index.js:67:22)
@ ./src/main.js 2:0-27 9:17-20
出错原因
因为项目vue
中的template
需要解析,他提示我们安装依赖模块vue-template-compiler
解决方案
安装依赖模块npm i vue-template-compiler --save-dev
即可
it works~
更多推荐
已为社区贡献2条内容
所有评论(0)