TypeError: CleanwebpackPlugin is not a constructor

前端 未结 10 2100
感动是毒
感动是毒 2021-01-01 08:39

i\'m trying to preview a vue web application through webpack-server-dev.I\'m following this guide https://medium.com/the-web-tub/creating-your-first-vue-js-pwa-project-22f7

10条回答
  •  独厮守ぢ
    2021-01-01 08:53

    This is probably a weird outlier reason for this - but I just came across this while setting up an old project on a new linux machine. It turned out I didn't have dev dependencies installed for my project (by default if npm config is set to production it won't install dev dependencies when running npm install - although I'm not sure exactly why mine was set to production), my webpack cli is 4 but my project is at 2.6.1 so it was using the webpack 4 but my webpack.config was for 2. So make sure your dev dependencies are installed.

提交回复
热议问题