1. 程式人生 > >vue-爬坑記錄(一)

vue-爬坑記錄(一)

一.編譯的時候提示找不到HeadNav.vue模組

ERROR Failed to compile with 1 errors 23:44:15
This relative module was not found:

* ./components/HeadNav in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/Index.vue?vue&type=script&lang=js&

 

解決方案:在其他vue檔案引入的時候,路徑寫錯.

import HeadNav from "../components/HeadNav"; 少寫了一個" . ",應該是點點