Skip to content

vue create [x] seems to have Hot Module Replacement disabled #1830

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
RickMeijer opened this issue Jul 12, 2018 · 4 comments
Closed

vue create [x] seems to have Hot Module Replacement disabled #1830

RickMeijer opened this issue Jul 12, 2018 · 4 comments

Comments

@RickMeijer
Copy link

Version

3.0.0-rc.3

Reproduction link

https://github.com/RickMeijer/bugreport-vue

Steps to reproduce

  • npm install @vue/cli -g
  • vue create foo
  • cd foo && npm run serve

What is expected?

Showing a welcome screen.

What is actually happening?

Chrome console shows following error:

Uncaught Error: [HMR] Hot Module Replacement is disabled.
    at eval (webpack:///(:8080/webpack)/hot/dev-server.js?:7:8)
    at Object../node_modules/webpack/hot/dev-server.js (app.js:1199)
    at __webpack_require__ (app.js:20)
    at eval (webpack:///multi_(:8080/webpack)-dev-server/client?:2:1)
    at Object.0 (app.js:1423)
    at __webpack_require__ (app.js:20)
    at app.js:84
    at app.js:87

Fixed by creating vue.config.js file and setting:

var webpack = require('webpack');
module.exports = {
  configureWebpack: {
    plugins: [new webpack.HotModuleReplacementPlugin()]
  }
};

Output of vue -V: 3.0.0-rc.3

@yyx990803
Copy link
Member

The scaffolded project seems to be using beta.15. Cannot reproduce with rc.3.

@appurist
Copy link

I'm having the same problem today with 3.0.0-rc.4 ...

I've only run a vue create vue-cli-app and selected the PWA option with all defaults.
If I then just:

cd vue-cli-app
npm run serve

I get the Uncaught Error: [HMR] Hot Module Replacement is disabled. error.

I have created a repo on GitHub with the output files from that vue create command and the subsequent stuff, here:
https://github.com/appurist/vue-cli-app

I'm on a Windows machine at the moment so I haven't tried this under Linux, perhaps that's the difference here. Every test I've done so far has always failed with the same error. It's definitely using 3.0.0-rc.4 in my tests (confirmed in the package.lock file).

@appurist
Copy link

Duh. I just noticed #1634 and set NODE_ENV=development (another duh) and it's fine. That DEV came from tests on another electron-based project. Please ignore these comments, case closed.

@RickMeijer
Copy link
Author

Ah I couldn't find that issue! That seemed to be the problem for me as well. My NODE_ENV was dev that I set a couple of years ago in my zshenv for an old project it seems. Thanks for the update @appurist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants