慕虎7497467
2019-08-17 16:56
npm run build 报错,这个有源码下载吗?
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/index.js 2:0-27 6:21-24
ERROR in ./src/app.vue
Module Error (from ./node_modules/vue-loader/lib/index.js):
vue-loader was used without the corresponding plugin. Make sure to include VueLoaderPlugin in your webpack config.
@ ./src/index.js 2:0-27 6:21-24
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 (D:\vscode\vuetest\node_modules\@vue\component-compiler-utils\dist\parse.js:14:23)
at Object.module.exports (D:\vscode\vuetest\node_modules\vue-loader\lib\index.js:67:22)
@ ./src/index.js 2:0-27 6:21-24
我的是app.vue里的样式报错 你把style里的样式先删了试试
webpack.config.js 加入
const VueLoaderPlugin = require('vue-loader/lib/plugin');
plugins:[
new VueLoaderPlugin()
]
你的包依赖没有安装好,插件也没装好,你可以参考一下我的代码
解决了吗 遇到了一样的问题,我要放弃了
Vue+Webpack打造todo应用
84606 学习 · 787 问题
相似问题
回答 2
回答 1
回答 1
回答 2
回答 3