1. 程式人生 > >vue報錯:無法啟動伺服器,報錯(npm run dev 報錯問題)(一)

vue報錯:無法啟動伺服器,報錯(npm run dev 報錯問題)(一)

vue 專案報錯大全(一) vue報錯:無法啟動伺服器,報錯(npm run dev 報錯問題) #出錯背景 自己搭建的vue框架,在搭建好一個專案時忽然報錯(在此之前其他專案正常執行中,搭建了新的專案啟動服務時啟動不了了。 #報錯程式碼 Invalid configuration object. webpack-dev-server has been initialised using a configuration object that does not match the API schema.

  • configuration.before should be an instance of function Exposes the Express server to add custom middleware or routes before webpack-dev-middleware will be added… npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR!
    [email protected]
    start: webpack-dev-server --config config/webpack.dev.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. 在這裡插入圖片描述 npm ERR! A complete log of this run can be found in: #解決方案
    * 通過查詢發現是因為還沒有編寫mock檔案裡的內容(好低階的錯誤。。)