bencodezen / vue-enterprise-boilerplate

An ever-evolving, very opinionated architecture and dev environment for new Vue SPA projects using Vue CLI.
7.77k stars 1.32k forks source link

Cannot read property 'webpackHotUpdate' of undefined #131

Closed diego81b closed 5 years ago

diego81b commented 5 years ago

Hi, i have this error in console either serving the build locally either deploying on cloud server. Removing --modern params from build all works fine

Best regards

chrisvfritz commented 5 years ago

Hi @diego81b. 🙂 Sorry to hear you ran into that issue. Is this happening with the raw boilerplate, or only after making some changes? Could you also provide operating system, version of Node, and version of NPM/Yarn you're using?

diego81b commented 5 years ago

Hi @chrisvfritz, i've used your template as starter for a project so i made changes only in terms of pages (obviously) and some additional packages and didn't work as expected. What looks strange is that i've an error on HMR that it's not enabled on production env.

If i use your template from scratch it works well but after adding code it broke production build.

i hope that i didn't waste your times best regards

P.S. my env is: win 7 Professional SP1 node:8.12.0 npm 5.7.1 yarn:1.1.13

chrisvfritz commented 5 years ago

Ah, OK. If it only happens after adding your own code, then it sounds like the issue is caused by the specific code/dependencies added. Can you identify the minimal code necessary to reproduce the problem?

diego81b commented 5 years ago

Asap I will try to isolate the problem in the hope that could help me and someone else. Thank you very much

diego81b commented 5 years ago

Hi @chrisvfritz i don't know wich off these steps fix the error:

  1. Update packages to the last version (taken from this repo)
  2. Update node.js to version 10.15.1
  3. Clean npm cache and Yarn cache
  4. remove from babel.config.js @babel/plugin-syntax-dynamic-import'] (i'm pretty sure that this is the responsible)

with this now works as expected best regards

chrisvfritz commented 5 years ago

Thanks for the update! I'm pretty sure that last one was the cause too. 🙂