Skip to content

HMR stopped working with update to cli 3.1.0 #2892

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
katonada opened this issue Nov 4, 2018 · 8 comments
Closed

HMR stopped working with update to cli 3.1.0 #2892

katonada opened this issue Nov 4, 2018 · 8 comments

Comments

@katonada
Copy link

katonada commented Nov 4, 2018

Version

3.1.1

Reproduction link

[fake url: https://create_new_project from cli_or_ui](https://create_new_project from cli_or_ui)

Node and OS info

win 10, chrome 70, node 8.12.0, (node 10.13.0, npm 6.4.1 four different PCs)

Steps to reproduce

Create a new project with Vue CLI ur UI (UI/Create, VUE create), start the project with either npm run serve or vue UI > tasks > serve

What is expected?

Hot reload after any file (JS, VUE, SCSS) changed

What is actually happening?

Nothing happens, no errors in chrome, no hot injection or reload


Stopped to inject/reload after updating to Vue-Cli 3.1.0

@LinusBorg LinusBorg added the cannot reproduce We cannot reproduce the problem with the given information. More env information needed. label Nov 4, 2018
@LinusBorg
Copy link
Member

LinusBorg commented Nov 4, 2018

Works for me. Can't do more without a reproduction.

Have you completely whiped node_modules an reinstalled anything? Did you change the location of your project, i.e. moved it to dropbox or anything?

@haoqunjiang
Copy link
Member

Did you choose e2e testing with cypress when creating the project?

@haoqunjiang
Copy link
Member

As @vue/cli-service v3.1 updated its webpack version resolution, it conflicts with @cypress/webpack-preprocessor's webpack dependency version, leading to 2 instances of webpack in the project dependency tree. That's why the HMR fails. This will be fixed in the next patch release.

@katonada
Copy link
Author

katonada commented Nov 5, 2018

@LinusBorg yes, I tried everything I can imagine.

  • delete node_modules, a new folder for the project
  • delete all global npm & npm_cache
  • updated node & npm

I'm not sure (i had many variants ...), some test app templates (test, default, custom) have hot-reload and some not, I wasn't careful so I'll try one by one again.

One thing I notice in the console (when hot-reload is not working) is:

Couldn't parse bundle asset "E:\-----projects\frontend_app\dist\0.js".
Analyzer will use module sizes from stats file.

I think that is webpack-bundle-analyzer problem.

@sodatea - yes, I have cypress installed, should I uninstall it?

@katonada
Copy link
Author

katonada commented Nov 5, 2018

After removing Cypress and downgrade cli-service to 3.0.5 (just removing Cypress, webpack dependency is removed too) HMR is working again.
@LinusBorg @sodatea thnx for the hints. I am waiting for the next update now.

@LinusBorg
Copy link
Member

LinusBorg commented Nov 5, 2018

Sidenote: good example why an act dual reproduction repository is very, very useful.

I didn't choose cypress for my attempt to reproduce the issue (since it wasn't mentioned) and consequently failed to reproduce the issue.

Had there been a repository to clone the I would have been successful right away.

@katonada
Copy link
Author

katonada commented Nov 5, 2018

@LinusBorg : my bad, I wasn't sure why some test projects works and other not so I instaled a fresh copy of test app on a new virtual machine and its work, on normal windows and on my wife's PS test app didn't work, my project didn't work on all three environments and I was not sure what is wrong and witch repo to send.

@LinusBorg
Copy link
Member

Yeah no worries.

We understand that it's not always easy provide the kind of reproduction we ask for, and apprechiate that you tried even if you ultimately didn't feel able to.

But some people don't understand why we ask for them in the first place and I just like to examplify the reasons when I come across an issue where one would have helped.

@LinusBorg LinusBorg added bug upstream scope: e2e-cypress and removed cannot reproduce We cannot reproduce the problem with the given information. More env information needed. labels Nov 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants