Webpack Error - Cannot Resolve File or Directory

后端 未结 3 1322
抹茶落季
抹茶落季 2021-01-11 09:56

I am getting this error when I npm start my webpack-dev-server:

ERROR in multi main
Module not found: Error: Cannot resolve \'file\' or \'directory\' /var/ww         


        
3条回答
  •  走了就别回头了
    2021-01-11 10:33

    You should check the browser console. It provides more detailed informations.

    In my case:

    Uncaught Error: Cannot find module "./src/index"
    at webpackMissingModule (webpack:///multi_main?:4)
    at eval (webpack:///multi_main?:4)
    at Object. (bundle.js:586)
    at __webpack_require__ (bundle.js:556)
    at bundle.js:579
    at bundle.js:582
    

    So here is the error a missing (or misspelled) java script file.

提交回复
热议问题