一、新建項目運行爲空白頁
解決:css
new Vue({ el: '#app', })
換成html
new Vue({ el: '#app', render: h => h(App) })
二、新建項目沒法運行,報錯[Vue warn]: You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build.(found in )
解決:build/webpack.base.conf.jsvue
resolve: { alias: { 'vue': 'vue/dist/vue.js' } }
三、打包後js,css樣式不對
解決:config/index.js,將其中的assetsPublicPath值改成’./’webpack
四、css中應用的資源找不到
解決:build/utils.js」,增長一行代碼,publicPath因路勁而定 web
五、報錯:Failed to mount component: template or render function not defined.found in
解決:我這裏是因爲我把vue文件裏面的html部分和js部分單獨分開,並且取名爲app.js所致,換個名字就能夠了
此問題緣由不單一,還有其餘問題所致。詳見連接描述segmentfault
六、vue報錯: Cannot assign to read only property 'exports' of object '#<Object>'
解決app